Explorar o código

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

rigormorrtiss %!s(int64=4) %!d(string=hai) anos
pai
achega
7b0a824f5b
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  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 {