fix: hide non-existent folders (#426)

This commit is contained in:
Retropaint 2024-09-20 02:10:40 +08:00 • committed by GitHub
parent ce69326513
commit 328a9c9a8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,6 +59,10 @@ func (s *State) onReady(r *gateway.ReadyEvent) {
// Track guilds that have a parent (folder) to add orphan channels later
var folderGuildIds []discord.GuildID
for _, folder := range r.UserSettings.GuildFolders {
// Hide unnamed, single-server folders
if folder.Name == "" && len(folder.GuildIDs) < 2 {
continue
}
folderGuildIds = append(folderGuildIds, folder.GuildIDs...)
mainFlex.guildsTree.createFolderNode(folder)