delaying theme color object call

This commit is contained in:
Jack 2020-07-30 21:08:24 +01:00
parent 9cfc3bd8d2
commit fd1af13364

View file

@ -532,7 +532,9 @@ function previewTheme(name) {
if (resultVisible && (name === "nausea" || name === "round_round_baby"))
return;
$("#currentTheme").attr("href", `themes/${name}.css`);
refreshThemeColorObject();
setTimeout(() => {
refreshThemeColorObject();
}, 500);
}
function setTheme(name, nosave) {
@ -557,7 +559,9 @@ function setTheme(name, nosave) {
} catch (e) {
console.log("Analytics unavailable");
}
refreshThemeColorObject();
setTimeout(() => {
refreshThemeColorObject();
}, 500);
if (!nosave) saveConfigToCookie();
}