From 010cb96efa6433dcf9176eba7941fbde2f002429 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 20 Jan 2022 01:03:21 +0100 Subject: [PATCH] not incrementing today tracker if test was invalid --- src/js/test/test-logic.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/js/test/test-logic.js b/src/js/test/test-logic.js index 723aef90a..9e5fde201 100644 --- a/src/js/test/test-logic.js +++ b/src/js/test/test-logic.js @@ -1646,14 +1646,16 @@ export async function finish(difficultyFailed = false) { // test is valid - TodayTracker.addSeconds( - completedEvent.testDuration + - (TestStats.incompleteSeconds < 0 - ? 0 - : Misc.roundTo2(TestStats.incompleteSeconds)) - - completedEvent.afkDuration - ); - Result.updateTodayTracker(); + if (!dontSave) { + TodayTracker.addSeconds( + completedEvent.testDuration + + (TestStats.incompleteSeconds < 0 + ? 0 + : Misc.roundTo2(TestStats.incompleteSeconds)) - + completedEvent.afkDuration + ); + Result.updateTodayTracker(); + } if (firebase.auth().currentUser == null) { $(".pageTest #result #rateQuoteButton").addClass("hidden");