hopefully fixed the tracker

This commit is contained in:
Miodec 2021-07-15 17:46:21 +01:00
parent 52dd1723f3
commit 3224753e6d

View file

@ -1253,14 +1253,15 @@ export function finish(difficultyFailed = false) {
if (afkSecondsPercent > 0) {
$("#result .stats .time .bottom .afk").text(afkSecondsPercent + "% afk");
}
let ttseconds = testtime - afkseconds;
// if (!difficultyFailed) {
// ttseconds +=
// TestStats.incompleteSeconds < 0
// ? 0
// : Misc.roundTo2(TestStats.incompleteSeconds);
// }
TodayTracker.addSeconds(ttseconds);
if (!difficultyFailed) {
TodayTracker.addSeconds(
testtime +
(TestStats.incompleteSeconds < 0
? 0
: Misc.roundTo2(TestStats.incompleteSeconds)) -
afkseconds
);
}
$("#result .stats .time .bottom .timeToday").text(TodayTracker.getString());
$("#result .stats .key .bottom").text(testtime + "s");
$("#words").removeClass("blurred");