mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-26 15:54:35 +08:00
moved quote repeat logic to the test restart function
This commit is contained in:
parent
96a624f9d4
commit
2a116763ed
1 changed files with 5 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue