mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-26 07:52:20 +00:00
Cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user