From 3587f547b5b79340b5eceea11fccd95c5c33afd5 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 27 Jun 2025 20:03:28 +0200 Subject: [PATCH] Refactored theme provider to replace obsolete calls (#511) --- app/MindWork AI Studio/Layout/MainLayout.razor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Layout/MainLayout.razor.cs b/app/MindWork AI Studio/Layout/MainLayout.razor.cs index 385ba5df..2367aff4 100644 --- a/app/MindWork AI Studio/Layout/MainLayout.razor.cs +++ b/app/MindWork AI Studio/Layout/MainLayout.razor.cs @@ -109,7 +109,7 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, ILan // Send a message to start the plugin system: await this.MessageBus.SendMessage(this, Event.STARTUP_PLUGIN_SYSTEM); - await this.themeProvider.WatchSystemPreference(this.SystemeThemeChanged); + await this.themeProvider.WatchSystemDarkModeAsync(this.SystemeThemeChanged); await this.UpdateThemeConfiguration(); this.LoadNavItems(); @@ -324,7 +324,7 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, ILan private async Task UpdateThemeConfiguration() { if (this.SettingsManager.ConfigurationData.App.PreferredTheme is Themes.SYSTEM) - this.useDarkMode = await this.themeProvider.GetSystemPreference(); + this.useDarkMode = await this.themeProvider.GetSystemDarkModeAsync(); else this.useDarkMode = this.SettingsManager.ConfigurationData.App.PreferredTheme == Themes.DARK;