mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-01-29 06:10:54 +00:00
[GUI] Refactor sorting
This commit is contained in:
@@ -150,11 +150,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||
var guildChannelMap = new Dictionary<Guild, IReadOnlyList<Channel>>();
|
||||
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;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
</CollectionViewSource.GroupDescriptions>
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
<componentModel:SortDescription Direction="Ascending" PropertyName="Category" />
|
||||
<componentModel:SortDescription Direction="Ascending" PropertyName="Name" />
|
||||
</CollectionViewSource.SortDescriptions>
|
||||
</CollectionViewSource>
|
||||
</Window.Resources>
|
||||
|
||||
Reference in New Issue
Block a user