From f4eef60a9ecd0b606211b786107bda1e3c0bee62 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 12 Jul 2024 15:42:59 +0200 Subject: [PATCH] fix(notify): only notify in countdown mode (fixes a panic) --- src/clock.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/clock.rs b/src/clock.rs index eb2cdde..01e2721 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -362,6 +362,13 @@ impl Clock { debug!("complete error: {e:#?}"); }); self.did_notify = true; + if let Some(TimeBarLength::Countup(_)) = self.timebar_len() { + let _ = self.notify().inspect_err(|e| { + error!("could not notify: {e}"); + debug!("complete error: {e:#?}"); + }); + self.did_notify = true; + } } let tmp = LineGauge::default()