mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 15:08:45 +08:00
delaying theme color object call
This commit is contained in:
parent
9cfc3bd8d2
commit
fd1af13364
1 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue