Skip to content

Commit 3587f54

Browse files
Refactored theme provider to replace obsolete calls (#511)
1 parent cf17c64 commit 3587f54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/MindWork AI Studio/Layout/MainLayout.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected override async Task OnInitializedAsync()
109109
// Send a message to start the plugin system:
110110
await this.MessageBus.SendMessage<bool>(this, Event.STARTUP_PLUGIN_SYSTEM);
111111

112-
await this.themeProvider.WatchSystemPreference(this.SystemeThemeChanged);
112+
await this.themeProvider.WatchSystemDarkModeAsync(this.SystemeThemeChanged);
113113
await this.UpdateThemeConfiguration();
114114
this.LoadNavItems();
115115

@@ -324,7 +324,7 @@ private async Task SystemeThemeChanged(bool isDark)
324324
private async Task UpdateThemeConfiguration()
325325
{
326326
if (this.SettingsManager.ConfigurationData.App.PreferredTheme is Themes.SYSTEM)
327-
this.useDarkMode = await this.themeProvider.GetSystemPreference();
327+
this.useDarkMode = await this.themeProvider.GetSystemDarkModeAsync();
328328
else
329329
this.useDarkMode = this.SettingsManager.ConfigurationData.App.PreferredTheme == Themes.DARK;
330330

0 commit comments

Comments
 (0)