From 6f54c09d96f95c2ff1fa5fd28f157c13368730db Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Wed, 12 Aug 2020 19:09:12 +0300 Subject: [PATCH] [GUI] Refactor sorting --- DiscordChatExporter.Gui/ViewModels/RootViewModel.cs | 6 +----- DiscordChatExporter.Gui/Views/RootView.xaml | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs b/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs index 75a9fb5b..ff185087 100644 --- a/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs @@ -150,11 +150,7 @@ namespace DiscordChatExporter.Gui.ViewModels var guildChannelMap = new Dictionary>(); await foreach (var guild in discord.GetUserGuildsAsync()) { - var channels = await discord.GetGuildChannelsAsync(guild.Id); - guildChannelMap[guild] = channels - .OrderBy(c => c.Category) - .ThenBy(c => c.Name) - .ToArray(); + guildChannelMap[guild] = await discord.GetGuildChannelsAsync(guild.Id); } GuildChannelMap = guildChannelMap; diff --git a/DiscordChatExporter.Gui/Views/RootView.xaml b/DiscordChatExporter.Gui/Views/RootView.xaml index 7072d2c7..fe1710b7 100644 --- a/DiscordChatExporter.Gui/Views/RootView.xaml +++ b/DiscordChatExporter.Gui/Views/RootView.xaml @@ -31,6 +31,7 @@ +