mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-06-02 23:59:50 -04:00
parent
c29de2c77c
commit
c410e745b1
5 changed files with 63 additions and 6 deletions
|
@ -89,11 +89,8 @@ public class DashboardViewModel : PropertyChangedBase
|
|||
Token = _settingsService.LastToken;
|
||||
}
|
||||
|
||||
public async ValueTask ShowSettingsAsync()
|
||||
{
|
||||
var dialog = _viewModelFactory.CreateSettingsViewModel();
|
||||
await _dialogManager.ShowDialogAsync(dialog);
|
||||
}
|
||||
public async ValueTask ShowSettingsAsync() =>
|
||||
await _dialogManager.ShowDialogAsync(_viewModelFactory.CreateSettingsViewModel());
|
||||
|
||||
public void ShowHelp() => ProcessEx.StartShellExecute(App.DocumentationUrl);
|
||||
|
||||
|
@ -165,6 +162,7 @@ public class DashboardViewModel : PropertyChangedBase
|
|||
|
||||
var channels = new List<Channel>();
|
||||
|
||||
// Regular channels
|
||||
await foreach (var channel in _discord.GetGuildChannelsAsync(SelectedGuild.Id))
|
||||
{
|
||||
if (channel.Kind == ChannelKind.GuildCategory)
|
||||
|
@ -173,6 +171,17 @@ public class DashboardViewModel : PropertyChangedBase
|
|||
channels.Add(channel);
|
||||
}
|
||||
|
||||
// Threads
|
||||
if (_settingsService.ShouldShowThreads)
|
||||
{
|
||||
await foreach (var thread in _discord.GetGuildThreadsAsync(
|
||||
SelectedGuild.Id,
|
||||
_settingsService.ShouldShowArchivedThreads))
|
||||
{
|
||||
channels.Add(thread);
|
||||
}
|
||||
}
|
||||
|
||||
AvailableChannels = channels;
|
||||
SelectedChannels = null;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,18 @@ public class SettingsViewModel : DialogScreen
|
|||
set => _settingsService.IsTokenPersisted = value;
|
||||
}
|
||||
|
||||
public bool ShouldShowThreads
|
||||
{
|
||||
get => _settingsService.ShouldShowThreads;
|
||||
set => _settingsService.ShouldShowThreads = value;
|
||||
}
|
||||
|
||||
public bool ShouldShowArchivedThreads
|
||||
{
|
||||
get => _settingsService.ShouldShowArchivedThreads;
|
||||
set => _settingsService.ShouldShowArchivedThreads = value;
|
||||
}
|
||||
|
||||
public string DateFormat
|
||||
{
|
||||
get => _settingsService.DateFormat;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue