From 56beda684012053578607bfe9c0b3358102c29bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 29 Jul 2023 16:11:25 +0200 Subject: [PATCH] fix: pauses not resetting --- src/pomodoro.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pomodoro.rs b/src/pomodoro.rs index 5981339..1bc2929 100644 --- a/src/pomodoro.rs +++ b/src/pomodoro.rs @@ -78,8 +78,13 @@ impl Pomodoro { }; self.status = match self.status { Status::Working => { - self.pauses += 1; - Status::Pausing + if self.pauses == self.pauses_till_long { + self.pauses = 0; + Status::LongPause + } else { + self.pauses += 1; + Status::Pausing + } } _ => Status::Working, };