Pārlūkot izejas kodu

fix(main): compare channel.CategoryID with discord.NullChannelID

rigormorrtiss 4 gadi atpakaļ
vecāks
revīzija
51d19f57b7
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      discordo.go

+ 1 - 1
discordo.go

@@ -188,7 +188,7 @@ func onGuildsDropDownSelected(_ string, i int) {
 			channelNode.SetColor(tcell.GetColor(config.Theme.TreeNodeForeground))
 			channelNode.SetColor(tcell.GetColor(config.Theme.TreeNodeForeground))
 			channelsTreeNode.AddChild(channelNode)
 			channelsTreeNode.AddChild(channelNode)
 		case discord.GuildText, discord.GuildNews:
 		case discord.GuildText, discord.GuildNews:
-			if channel.CategoryID == 0 {
+			if channel.CategoryID == discord.NullChannelID {
 				channelNode.SetText("[::d]#" + channel.Name + "[-:-:-]")
 				channelNode.SetText("[::d]#" + channel.Name + "[-:-:-]")
 				channelsTreeNode.AddChild(channelNode)
 				channelsTreeNode.AddChild(channelNode)
 			}
 			}