diff --git a/DiscordChatExporter.Gui/App.axaml.cs b/DiscordChatExporter.Gui/App.axaml.cs index 5ea28a9e..975b34ae 100644 --- a/DiscordChatExporter.Gui/App.axaml.cs +++ b/DiscordChatExporter.Gui/App.axaml.cs @@ -96,9 +96,6 @@ public class App : Application, IDisposable public override void OnFrameworkInitializationCompleted() { - // Initialize the default theme, before a custom one (if any) is applied by loading settings - InitializeTheme(); - // Load settings _settingsService.Load(); @@ -117,6 +114,9 @@ public class App : Application, IDisposable desktop.Exit += (_, _) => Dispose(); } + // Initialize the theme for the first time; must be done after the main window is created + InitializeTheme(); + base.OnFrameworkInitializationCompleted(); }