Add sqlite and config support
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user