not incrementing today tracker if test was invalid

This commit is contained in:
Miodec 2022-01-20 01:03:21 +01:00
parent 2a98836827
commit 010cb96efa

View file

@ -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");