mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-06-02 23:59:50 -04:00
Cleanup
This commit is contained in:
parent
bf5cedb646
commit
e22e1c03fb
5 changed files with 27 additions and 12 deletions
|
@ -137,9 +137,13 @@ namespace DiscordChatExporter.Gui.ViewModels
|
|||
|
||||
// Get DM channels
|
||||
{
|
||||
var channels = await _dataService.GetDirectMessageChannelsAsync(token);
|
||||
var guild = Guild.DirectMessages;
|
||||
_guildChannelsMap[guild] = channels.OrderBy(c => c.Name).ToArray();
|
||||
var channels = await _dataService.GetDirectMessageChannelsAsync(token);
|
||||
|
||||
// Order channels
|
||||
channels = channels.OrderBy(c => c.Name).ToArray();
|
||||
|
||||
_guildChannelsMap[guild] = channels;
|
||||
}
|
||||
|
||||
// Get guild channels
|
||||
|
@ -148,9 +152,11 @@ namespace DiscordChatExporter.Gui.ViewModels
|
|||
foreach (var guild in guilds)
|
||||
{
|
||||
var channels = await _dataService.GetGuildChannelsAsync(token, guild.Id);
|
||||
_guildChannelsMap[guild] = channels.Where(c => c.Type == ChannelType.GuildTextChat)
|
||||
.OrderBy(c => c.Name)
|
||||
.ToArray();
|
||||
|
||||
// Filter and order channels
|
||||
channels = channels.Where(c => c.Type == ChannelType.GuildTextChat).OrderBy(c => c.Name).ToArray();
|
||||
|
||||
_guildChannelsMap[guild] = channels;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue