saving repeated time typing as incomplete

so it can be saved on the next successful result save
closes #3666
This commit is contained in:
Miodec 2022-10-17 14:21:34 +02:00
parent a67aeaf977
commit 37a56b11e3

View file

@ -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) {