resolve conflict in applyPreferredColorScheme method

This commit is contained in:
heaprc 2025-04-03 09:31:53 +02:00
parent bbb211d819
commit 0e7b1f7c78

View file

@ -178,8 +178,7 @@ class OptionsWaiter {
const themeFromStorage = this.app?.options?.theme;
let theme = themeFromStorage;
if (!theme) {
const preferredTheme = (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "classic");
theme = preferredTheme;
theme = this.getPreferredColorScheme();
}
this.changeTheme(theme);
}