fixed double theme change

This commit is contained in:
Miodec 2022-06-25 01:01:35 +02:00
parent 7c82bf6e82
commit 27b9c441b5

View file

@ -1260,7 +1260,7 @@ export function setTheme(name: string, nosave?: boolean): boolean {
if (!isConfigValueValid("theme", name, ["string"])) return false;
config.theme = name;
setCustomTheme(false);
if (config.customTheme === true) setCustomTheme(false);
saveToLocalStorage("theme", nosave);
ConfigEvent.dispatch("theme", config.theme);