Compare commits

...

2 commits

2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ pub fn run_path() -> String {
}
pub fn send_notifictation(msg: &str) {
match Notification::new().summary("󰀠 Timers").body(msg).show() {
match Notification::new().summary("󰀠 Timers").body(msg).urgency(notify_rust::Urgency::Critical).show() {
Ok(_) => println!("Sent notification sucessfully."),
Err(_) => println!("Failed to send notification."),
};

View file

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