Optimize thread inclusion UX across GUI and CLI

Related to #1119
This commit is contained in:
Tyrrrz
2023-08-28 22:08:51 +03:00
parent d430f77ae1
commit 3740d64601
9 changed files with 49 additions and 79 deletions

View File

@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using DiscordChatExporter.Gui.Models;
using DiscordChatExporter.Gui.Services;
using DiscordChatExporter.Gui.ViewModels.Framework;
@@ -26,23 +28,13 @@ public class SettingsViewModel : DialogScreen
set => _settingsService.IsTokenPersisted = value;
}
public bool ShouldShowThreads
{
get => _settingsService.ShouldShowThreads;
set => _settingsService.ShouldShowThreads = value;
}
public IReadOnlyList<ThreadInclusion> AvailableThreadInclusions { get; } =
Enum.GetValues<ThreadInclusion>();
public bool ShouldShowArchivedThreads
public ThreadInclusion ThreadInclusion
{
get => _settingsService.ShouldShowArchivedThreads;
set
{
_settingsService.ShouldShowArchivedThreads = value;
// Enabling archived threads implicitly enables threads
if (value)
ShouldShowThreads = true;
}
get => _settingsService.ThreadInclusion;
set => _settingsService.ThreadInclusion = value;
}
public string DateFormat