feat(main): suffix channel topic after channel name (#17)

This commit is contained in:
rigormorrtiss 2021-08-03 16:46:46 +04:00 • committed by GitHub
parent a5a5865866
commit e985ac55ed

View file

@ -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)