From e985ac55ed81fed1c512797f7c0b959e193f144c Mon Sep 17 00:00:00 2001 From: rigormorrtiss Date: Tue, 3 Aug 2021 16:46:46 +0400 Subject: [PATCH] feat(main): suffix channel topic after channel name (#17) --- discordo.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/discordo.go b/discordo.go index 0e89365..db31c46 100644 --- a/discordo.go +++ b/discordo.go @@ -229,7 +229,13 @@ func onChannelsTreeViewSelected(node *tview.TreeNode) { node.SetExpanded(!node.IsExpanded()) } case discord.GuildText, discord.GuildNews: - messagesTextView.SetTitle(currentChannel.Name) + title := currentChannel.Name + + if currentChannel.Topic != "" { + title += " - " + currentChannel.Topic + } + + messagesTextView.SetTitle(title) app.SetFocus(messageInputField) messages, err := discordSession.Messages(currentChannel.ID, config.GetMessagesLimit)