Przeglądaj źródła

fix: hide non-existent folders (#426)

Retropaint 1 rok temu
rodzic
commit
328a9c9a8b
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      cmd/state.go

+ 4 - 0
cmd/state.go

@@ -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)