From 2a116763edf72287d7ca7e79fc6b398872738552 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sat, 14 May 2022 20:24:38 +0200 Subject: [PATCH] moved quote repeat logic to the test restart function --- frontend/src/ts/test/test-logic.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 815272f12..a9d39dea5 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -343,6 +343,10 @@ export function restart( } } if (TestActive.get()) { + if (Config.repeatQuotes === "typing" && Config.mode === "quote") { + withSameWordset = true; + } + TestInput.pushKeypressesToHistory(); const testSeconds = TestStats.calculateTestSeconds(performance.now()); const afkseconds = TestStats.calculateAfkSeconds(testSeconds); @@ -1632,16 +1636,7 @@ $(document).on("click", "#testModesNotice .text-button.restart", () => { $(document).on("keypress", "#restartTestButton", (event) => { if (event.key === "Enter") { - ManualRestart.reset(); - if ( - TestActive.get() && - Config.repeatQuotes === "typing" && - Config.mode === "quote" - ) { - restart(true); - } else { - restart(); - } + restart(); } });