diff --git a/src/helper.rs b/src/helper.rs index 454f983..ecd9b90 100644 --- a/src/helper.rs +++ b/src/helper.rs @@ -9,7 +9,7 @@ pub fn run_path() -> String { } pub fn send_notifictation(msg: &str) { - match Notification::new().summary("󰀠 Timers").body(msg).urgency(notify_rust::Urgency::Critical).show() { + match Notification::new().summary("󰀠 Timers").body(msg).show() { Ok(_) => println!("Sent notification sucessfully."), Err(_) => println!("Failed to send notification."), }; diff --git a/src/timer.rs b/src/timer.rs index af2ca46..c8226fa 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -34,7 +34,7 @@ impl Timer { /// Returns `true` if this [`Timer`] has expired pub fn is_expired(&self) -> bool { - let expired = self.remaining().is_zero(); + let expired = Instant::now() - self.start > self.duration; if expired { self.handle_expiration() };