fix(notify): only notify in countdown mode (fixes a panic)

This commit is contained in:
Christoph J. Scherr 2024-07-12 15:42:59 +02:00 committed by PlexSheep
parent a56e454935
commit 265ac6c22c
1 changed files with 7 additions and 0 deletions

View File

@ -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()