mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
not incrementing today tracker if test was invalid
This commit is contained in:
parent
2a98836827
commit
010cb96efa
1 changed files with 10 additions and 8 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue