mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
feat: synchronise settingstate and theme properly
This commit is contained in:
@@ -23,10 +23,9 @@
|
|||||||
if (theme.id === themes?.selectedTheme) {
|
if (theme.id === themes?.selectedTheme) {
|
||||||
await disableTheme();
|
await disableTheme();
|
||||||
themes.selectedTheme = '';
|
themes.selectedTheme = '';
|
||||||
settingsState.selectedColor = settingsState.originalSelectedColor;
|
|
||||||
} else {
|
} else {
|
||||||
await setTheme(theme.id);
|
await setTheme(theme.id);
|
||||||
settingsState.selectedColor = theme.defaultColour;
|
settingsState.selectedColor = theme.defaultColour; // settingsState and the theme need to be synchronised.
|
||||||
if (!themes) return;
|
if (!themes) return;
|
||||||
themes.selectedTheme = theme.id;
|
themes.selectedTheme = theme.id;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user