diff --git a/DiscordChatExporter.Core.Services/SettingsService.cs b/DiscordChatExporter.Core.Services/SettingsService.cs
index e8bd53c1..fa6f5502 100644
--- a/DiscordChatExporter.Core.Services/SettingsService.cs
+++ b/DiscordChatExporter.Core.Services/SettingsService.cs
@@ -5,9 +5,11 @@ namespace DiscordChatExporter.Core.Services
{
public class SettingsService : SettingsManager
{
+ public string DateFormat { get; set; } = "dd-MMM-yy hh:mm tt";
+
public bool IsAutoUpdateEnabled { get; set; } = true;
- public string DateFormat { get; set; } = "dd-MMM-yy hh:mm tt";
+ public bool IsTokenPersisted { get; set; } = true;
public AuthToken? LastToken { get; set; }
@@ -21,5 +23,7 @@ namespace DiscordChatExporter.Core.Services
Configuration.SubDirectoryPath = "";
Configuration.FileName = "Settings.dat";
}
+
+ public bool ShouldSerializeLastToken() => IsTokenPersisted;
}
}
\ No newline at end of file
diff --git a/DiscordChatExporter.Gui/ViewModels/Dialogs/SettingsViewModel.cs b/DiscordChatExporter.Gui/ViewModels/Dialogs/SettingsViewModel.cs
index 57bcb4d6..7e87672e 100644
--- a/DiscordChatExporter.Gui/ViewModels/Dialogs/SettingsViewModel.cs
+++ b/DiscordChatExporter.Gui/ViewModels/Dialogs/SettingsViewModel.cs
@@ -7,16 +7,22 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
{
private readonly SettingsService _settingsService;
+ public string DateFormat
+ {
+ get => _settingsService.DateFormat;
+ set => _settingsService.DateFormat = value;
+ }
+
public bool IsAutoUpdateEnabled
{
get => _settingsService.IsAutoUpdateEnabled;
set => _settingsService.IsAutoUpdateEnabled = value;
}
- public string DateFormat
+ public bool IsTokenPersisted
{
- get => _settingsService.DateFormat;
- set => _settingsService.DateFormat = value;
+ get => _settingsService.IsTokenPersisted;
+ set => _settingsService.IsTokenPersisted = value;
}
public SettingsViewModel(SettingsService settingsService)
diff --git a/DiscordChatExporter.Gui/Views/Dialogs/SettingsView.xaml b/DiscordChatExporter.Gui/Views/Dialogs/SettingsView.xaml
index b45400f0..03d5d028 100644
--- a/DiscordChatExporter.Gui/Views/Dialogs/SettingsView.xaml
+++ b/DiscordChatExporter.Gui/Views/Dialogs/SettingsView.xaml
@@ -41,6 +41,21 @@
IsChecked="{Binding IsAutoUpdateEnabled}" />
+
+
+
+
+
+