mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 21:33:40 +08:00
not reverting practise missed if the test was restarted by practise missed. this one actually fixes #1424
This commit is contained in:
parent
826232d6ec
commit
0bf8112110
2 changed files with 12 additions and 3 deletions
|
@ -30,7 +30,7 @@ export function init() {
|
|||
CustomText.setIsWordRandom(true);
|
||||
CustomText.setWord(Object.keys(TestStats.missedWords).length * 5);
|
||||
|
||||
TestLogic.restart();
|
||||
TestLogic.restart(false, false, false, true);
|
||||
before.mode = mode;
|
||||
before.punctuation = punctuation;
|
||||
before.numbers = numbers;
|
||||
|
|
|
@ -608,7 +608,12 @@ export async function init() {
|
|||
}
|
||||
}
|
||||
|
||||
export function restart(withSameWordset = false, nosave = false, event) {
|
||||
export function restart(
|
||||
withSameWordset = false,
|
||||
nosave = false,
|
||||
event,
|
||||
practiseMissed = false
|
||||
) {
|
||||
if (TestUI.testRestarting || TestUI.resultCalculating) {
|
||||
try {
|
||||
event.preventDefault();
|
||||
|
@ -670,7 +675,11 @@ export function restart(withSameWordset = false, nosave = false, event) {
|
|||
$("#words").empty();
|
||||
}
|
||||
|
||||
if (PractiseMissed.before.mode !== null && !withSameWordset) {
|
||||
if (
|
||||
PractiseMissed.before.mode !== null &&
|
||||
!withSameWordset &&
|
||||
!practiseMissed
|
||||
) {
|
||||
Notifications.add("Reverting to previous settings.", 0);
|
||||
UpdateConfig.setMode(PractiseMissed.before.mode);
|
||||
UpdateConfig.setPunctuation(PractiseMissed.before.punctuation);
|
||||
|
|
Loading…
Reference in a new issue