Merge pull request #2006 from 0xh3xa/master
Some checks failed
CodeQL Analysis / Analyze (push) Has been cancelled
Master Build, Test & Deploy / main (push) Has been cancelled

Bug Fix: selected theme not loading when refreshing
This commit is contained in:
a3957273 2025-04-03 19:15:02 +01:00 committed by GitHub
commit 848660f8e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -175,7 +175,11 @@ class OptionsWaiter {
* Applies the user's preferred color scheme using the `prefers-color-scheme` media query. * Applies the user's preferred color scheme using the `prefers-color-scheme` media query.
*/ */
applyPreferredColorScheme() { applyPreferredColorScheme() {
const theme = this.getPreferredColorScheme(); const themeFromStorage = this.app?.options?.theme;
let theme = themeFromStorage;
if (!theme) {
theme = this.getPreferredColorScheme();
}
this.changeTheme(theme); this.changeTheme(theme);
} }