fix: pauses not resetting

This commit is contained in:
Moritz Böhme 2023-07-29 16:11:25 +02:00
parent 61b7bd447d
commit 56beda6840
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -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,
};