aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMiodec <[email protected]>2023-03-07 21:10:21 +0100
committerMiodec <[email protected]>2023-03-07 21:10:33 +0100
commit2e284e364efd27f39660b088f8e09e3ee9d2540e (patch)
treecf4b7ed7788ed4bf34613a10950cfa203b353fdf
parent41b71fbf215793e6e4172da7fee45cbfbb42dd1a (diff)
downloadmonkeytype-2e284e364efd27f39660b088f8e09e3ee9d2540e.tar.gz
monkeytype-2e284e364efd27f39660b088f8e09e3ee9d2540e.zip
no sleep needed
-rw-r--r--frontend/src/ts/test/test-ui.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts
index f89169a83..b4f3d1208 100644
--- a/frontend/src/ts/test/test-ui.ts
+++ b/frontend/src/ts/test/test-ui.ts
@@ -42,15 +42,15 @@ const debouncedZipfCheck = debounce(250, () => {
});
});
-ConfigEvent.subscribe((eventKey, eventValue) => {
+ConfigEvent.subscribe((eventKey, eventValue, nosave) => {
if (
(eventKey === "language" || eventKey === "funbox") &&
(eventValue as string).split("#").includes("zipf")
) {
debouncedZipfCheck();
}
- if (eventKey === "fontSize") {
- Misc.sleep(0).then(() => updateWordsHeight(true));
+ if (eventKey === "fontSize" && !nosave) {
+ updateWordsHeight(true);
}
if (eventValue === undefined || typeof eventValue !== "boolean") return;