mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-27 00:12:57 +00:00
Clean up
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace DiscordChatExporter.Gui.Models;
|
||||
|
||||
public enum ThreadInclusion
|
||||
public enum ThreadInclusionMode
|
||||
{
|
||||
None,
|
||||
Active,
|
||||
@@ -17,7 +17,7 @@ public partial class SettingsService : SettingsBase
|
||||
|
||||
public bool IsTokenPersisted { get; set; } = true;
|
||||
|
||||
public ThreadInclusion ThreadInclusion { get; set; } = ThreadInclusion.None;
|
||||
public ThreadInclusionMode ThreadInclusionMode { get; set; } = ThreadInclusionMode.None;
|
||||
|
||||
public string DateFormat { get; set; } = "MM/dd/yyyy h:mm tt";
|
||||
|
||||
|
||||
@@ -170,12 +170,12 @@ public class DashboardViewModel : PropertyChangedBase
|
||||
}
|
||||
|
||||
// Threads
|
||||
if (_settingsService.ThreadInclusion != ThreadInclusion.None)
|
||||
if (_settingsService.ThreadInclusionMode != ThreadInclusionMode.None)
|
||||
{
|
||||
await foreach (
|
||||
var thread in _discord.GetGuildThreadsAsync(
|
||||
SelectedGuild.Id,
|
||||
_settingsService.ThreadInclusion == ThreadInclusion.All
|
||||
_settingsService.ThreadInclusionMode == ThreadInclusionMode.All
|
||||
)
|
||||
)
|
||||
{
|
||||
|
||||
@@ -28,13 +28,13 @@ public class SettingsViewModel : DialogScreen
|
||||
set => _settingsService.IsTokenPersisted = value;
|
||||
}
|
||||
|
||||
public IReadOnlyList<ThreadInclusion> AvailableThreadInclusions { get; } =
|
||||
Enum.GetValues<ThreadInclusion>();
|
||||
public IReadOnlyList<ThreadInclusionMode> AvailableThreadInclusions { get; } =
|
||||
Enum.GetValues<ThreadInclusionMode>();
|
||||
|
||||
public ThreadInclusion ThreadInclusion
|
||||
public ThreadInclusionMode ThreadInclusionMode
|
||||
{
|
||||
get => _settingsService.ThreadInclusion;
|
||||
set => _settingsService.ThreadInclusion = value;
|
||||
get => _settingsService.ThreadInclusionMode;
|
||||
set => _settingsService.ThreadInclusionMode = value;
|
||||
}
|
||||
|
||||
public string DateFormat
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
IsChecked="{Binding IsTokenPersisted}" />
|
||||
</DockPanel>
|
||||
|
||||
<!-- Thread inclusion -->
|
||||
<!-- Thread inclusion mode -->
|
||||
<DockPanel
|
||||
Margin="16,8"
|
||||
Background="Transparent"
|
||||
@@ -96,7 +96,7 @@
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"
|
||||
ItemsSource="{Binding AvailableThreadInclusions}"
|
||||
SelectedItem="{Binding ThreadInclusion}" />
|
||||
SelectedItem="{Binding ThreadInclusionMode}" />
|
||||
</DockPanel>
|
||||
|
||||
<!-- Date format -->
|
||||
|
||||
Reference in New Issue
Block a user