Эх сурвалжийг харах

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

rigormorrtiss 4 жил өмнө
parent
commit
e985ac55ed
1 өөрчлөгдсөн 7 нэмэгдсэн , 1 устгасан
  1. 7 1
      discordo.go

+ 7 - 1
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)