Procházet zdrojové kódy

feat(main): suffix text channel topic to TextView title (#27)

rigormorrtiss před 4 roky
rodič
revize
7b0a824f5b
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      discordo.go

+ 6 - 1
discordo.go

@@ -210,7 +210,12 @@ func onGuildsTreeViewSelected(n *tview.TreeNode) {
 				currentChannel = r
 				app.SetFocus(messageInputField)
 				messagesTextView.Clear()
-				messagesTextView.SetTitle(r.Name)
+
+				title := "#" + r.Name
+				if r.Topic != "" {
+					title += " - " + r.Topic
+				}
+				messagesTextView.SetTitle(title)
 
 				for _, t := range currentGuild.Threads {
 					if t.ParentID == currentChannel.ID {