fix(notification): remove callbacks in favour of mpsc messaging (#64)

This commit is contained in:
Jens Krause
2025-02-05 13:35:24 +01:00
committed by GitHub
parent 7ff167368d
commit 886deb3311
7 changed files with 70 additions and 94 deletions

View File

@@ -5,6 +5,7 @@ use tokio::sync::mpsc;
use tokio::time::interval;
use tokio_stream::{wrappers::IntervalStream, StreamMap};
use crate::common::ClockTypeId;
use crate::constants::{FPS_VALUE_MS, TICK_VALUE_MS};
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
@@ -25,7 +26,7 @@ pub enum TuiEvent {
#[derive(Clone, Debug)]
pub enum AppEvent {
ClockDone,
ClockDone(ClockTypeId, String),
}
pub type AppEventTx = mpsc::UnboundedSender<AppEvent>;