fix: pauses not resetting

man-page
Moritz Böhme 2023-07-29 16:11:25 +02:00
parent 61b7bd447d
commit 56beda6840
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
1 changed files with 7 additions and 2 deletions

View File

@ -78,9 +78,14 @@ impl Pomodoro {
}; };
self.status = match self.status { self.status = match self.status {
Status::Working => { Status::Working => {
if self.pauses == self.pauses_till_long {
self.pauses = 0;
Status::LongPause
} else {
self.pauses += 1; self.pauses += 1;
Status::Pausing Status::Pausing
} }
}
_ => Status::Working, _ => Status::Working,
}; };
self.timer = Timer::new(self.status.to_string().into_boxed_str(), duration); self.timer = Timer::new(self.status.to_string().into_boxed_str(), duration);