mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-24 03:36:52 -04:00
[GUI] Refactor sorting
This commit is contained in:
parent
45926b0990
commit
6f54c09d96
2 changed files with 2 additions and 5 deletions
|
@ -150,11 +150,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||||
var guildChannelMap = new Dictionary<Guild, IReadOnlyList<Channel>>();
|
var guildChannelMap = new Dictionary<Guild, IReadOnlyList<Channel>>();
|
||||||
await foreach (var guild in discord.GetUserGuildsAsync())
|
await foreach (var guild in discord.GetUserGuildsAsync())
|
||||||
{
|
{
|
||||||
var channels = await discord.GetGuildChannelsAsync(guild.Id);
|
guildChannelMap[guild] = await discord.GetGuildChannelsAsync(guild.Id);
|
||||||
guildChannelMap[guild] = channels
|
|
||||||
.OrderBy(c => c.Category)
|
|
||||||
.ThenBy(c => c.Name)
|
|
||||||
.ToArray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GuildChannelMap = guildChannelMap;
|
GuildChannelMap = guildChannelMap;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
</CollectionViewSource.GroupDescriptions>
|
</CollectionViewSource.GroupDescriptions>
|
||||||
<CollectionViewSource.SortDescriptions>
|
<CollectionViewSource.SortDescriptions>
|
||||||
<componentModel:SortDescription Direction="Ascending" PropertyName="Category" />
|
<componentModel:SortDescription Direction="Ascending" PropertyName="Category" />
|
||||||
|
<componentModel:SortDescription Direction="Ascending" PropertyName="Name" />
|
||||||
</CollectionViewSource.SortDescriptions>
|
</CollectionViewSource.SortDescriptions>
|
||||||
</CollectionViewSource>
|
</CollectionViewSource>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue