Add sqlite and config support

This commit is contained in:
2025-10-09 11:33:06 +08:00
parent 5053d19d73
commit 10b89aee17
14 changed files with 758 additions and 33 deletions

View File

@@ -22,7 +22,7 @@ pub(crate) struct EventHandler {
impl EventHandler {
pub fn new(tick_rate: Duration) -> Self {
let mut interval = tokio::time::interval(tick_rate);
let mut event_reader = crossterm::event::EventStream::new();
let mut event_reader = event::EventStream::new();
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
let _tx = tx.clone();
@@ -37,8 +37,7 @@ impl EventHandler {
tx.send(Event::Error).unwrap()
}
else if let Some(Ok(event)) = maybe_event &&
let event::Event::Key(key) = event &&
key.kind == event::KeyEventKind::Press
let event::Event::Key(key) = event
{
tx.send(Event::Key(key)).unwrap()
}