Fixed live counter not updating correctly

This commit is contained in:
Maximilian Giller 2021-11-07 23:22:05 +01:00
parent 6a96ef55c0
commit 206ef4c503

View file

@ -177,7 +177,13 @@ export default {
this.$router.push("/record/" + id);
},
increaseTimer: function() {
this.timerDelta++;
if (this.records.length <= 0) {
return;
}
var record = this.records[0];
var liveDuration = (new Date().getTime() - new Date(record.start_time).getTime()) / 1000;
this.timerDelta = liveDuration - record.duration;
}
}
};