fix: pausing of timers/pomodoro not working

This commit is contained in:
Moritz Böhme 2023-08-16 17:09:02 +02:00
parent e3fd65e98b
commit 8912151bdc
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -34,7 +34,7 @@ impl Timer {
/// Returns `true` if this [`Timer`] has expired /// Returns `true` if this [`Timer`] has expired
pub fn is_expired(&self) -> bool { pub fn is_expired(&self) -> bool {
let expired = Instant::now() - self.start > self.duration; let expired = self.remaining().is_zero();
if expired { if expired {
self.handle_expiration() self.handle_expiration()
}; };