From d35198c56dbae42847863bfbe8db2bf5a377b9d6 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Sun, 28 Dec 2025 17:23:36 -0500 Subject: [PATCH] Adding sorting for server and channel names in the text menu of config --- discover_overlay/settings_window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index 2c4ac8d..640b7a6 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -325,11 +325,13 @@ class MainSettingsWindow(): self.channel_ids = [] g.remove_all() c.remove_all() - for guild in data['guild'].values(): + guilds = sorted(data['guild'].values(), key=lambda x: x['name'].lower()) + for guild in guilds: g.append_text(guild['name']) self.guild_ids.append(guild['id']) if guild['id'] == self.current_guild and 'channels' in guild: - for channel in guild['channels']: + channels = sorted(guild['channels'], key=lambda x: x['name'].lower()) + for channel in channels: c.append_text(channel['name']) self.channel_ids.append(channel['id']) except FileNotFoundError: