mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
saving repeated time typing as incomplete
so it can be saved on the next successful result save closes #3666
This commit is contained in:
parent
a67aeaf977
commit
37a56b11e3
|
@ -1619,6 +1619,16 @@ export async function finish(difficultyFailed = false): Promise<void> {
|
|||
|
||||
// test is valid
|
||||
|
||||
if (TestState.isRepeated) {
|
||||
const testSeconds = completedEvent.testDuration;
|
||||
const afkseconds = completedEvent.afkDuration;
|
||||
let tt = Misc.roundTo2(testSeconds - afkseconds);
|
||||
if (tt < 0) tt = 0;
|
||||
const acc = completedEvent.acc;
|
||||
TestStats.incrementIncompleteSeconds(tt);
|
||||
TestStats.pushIncompleteTest(acc, tt);
|
||||
}
|
||||
|
||||
const customTextName = CustomTextState.getCustomTextName();
|
||||
const isLong = CustomTextState.isCustomTextLong();
|
||||
if (Config.mode === "custom" && customTextName !== "" && isLong) {
|
||||
|
|
Loading…
Reference in a new issue