From fd1af133646c526c84ecf7e2d6076ae7650316b3 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 30 Jul 2020 21:08:24 +0100 Subject: [PATCH] delaying theme color object call --- public/js/userconfig.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/js/userconfig.js b/public/js/userconfig.js index dfa5cca4c..7fdfe4866 100644 --- a/public/js/userconfig.js +++ b/public/js/userconfig.js @@ -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(); }