From d83f8edb0a917a9b7dea469075f7cd5cd26f0d35 Mon Sep 17 00:00:00 2001 From: RemiSaurel Date: Wed, 24 Aug 2022 10:18:06 +0200 Subject: [PATCH] hotfix pause + timer --- src/components/Pomodoro.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Pomodoro.vue b/src/components/Pomodoro.vue index f5dff77..15eee37 100644 --- a/src/components/Pomodoro.vue +++ b/src/components/Pomodoro.vue @@ -128,6 +128,7 @@ export default { }, countDownTimer: function () { if (this.minutes === "00" && this.seconds === "00") { + console.log("ici") if (this.isRestingTime) { this.isRestingTime = false; this.resetSession(); @@ -161,11 +162,14 @@ export default { } else { this.seconds -= 1; } - this.prettyTime(); expected += interval; - this.timeout = setTimeout(this.countDownTimer, Math.max(0, interval - dt)); + this.timeout = setTimeout(stepFunc, Math.max(0, interval - dt)); + this.prettyTime(); + if (this.minutes === "00" && this.seconds === "00") { + this.countDownTimer() + } } - this.timeout = setTimeout(stepFunc, interval) + this.timeout = setTimeout(stepFunc, interval); } }, changeDots() {