Fix bug that bot accounts don't have a guild selected initially. THis was due to the fact that guilds on bots are loaded lazy
MODIFY
ui/window.go
ui/window.go
@@ -1672,9 +1672,16 @@ func (window *Window) registerGuildHandlers() {
go func() {
for guildCreate := range guildCreateChannel {
guild := guildCreate
+ if window.guildList.GetCurrentNode() == nil {
window.app.QueueUpdateDraw(func() {
window.guildList.AddGuild(guild.ID, guild.Name)
+ window.guildList.SetCurrentNode(window.guildList.GetRoot())
})
+ } else {
+ window.app.QueueUpdateDraw(func() {
+ window.guildList.AddGuild(guild.ID, guild.Name)
+ })
+ }
}
}()

Fix bug that bot accounts don't have a guild selected initially. THis was due to the fact that guilds on bots are loaded lazy