From 6b9663a2c20b6483c1f4b1b9cc964719cfe43a0e Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 26 May 2023 00:19:28 -0400 Subject: other: clean up some fixmes (#1171) --- src/app/query.rs | 3 ++- src/bin/main.rs | 1 - src/lib.rs | 15 ++++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/query.rs b/src/app/query.rs index eb2d281f..17cc1c44 100644 --- a/src/app/query.rs +++ b/src/app/query.rs @@ -338,7 +338,8 @@ pub fn parse_query( let mut condition: Option = None; let mut value: Option = None; - // TODO: Jeez, what the heck did I write here... add some tests and clean this up, please. + // TODO: Jeez, what the heck did I write here... add some tests and clean this up in the + // future. if content == "=" { condition = Some(QueryComparison::Equal); if let Some(queue_next) = query.pop_front() { diff --git a/src/bin/main.rs b/src/bin/main.rs index b7097991..bb152943 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -175,7 +175,6 @@ fn main() -> Result<()> { break; } BottomEvent::Resize => { - // FIXME: This is bugged with frozen? try_drawing(&mut terminal, &mut app, &mut painter)?; } BottomEvent::KeyInput(event) => { diff --git a/src/lib.rs b/src/lib.rs index 83938c8d..674593dd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -433,12 +433,12 @@ pub fn create_input_thread( if let Ok(poll) = poll(Duration::from_millis(20)) { if poll { if let Ok(event) = read() { - // FIXME: Handle all other event cases. match event { - // TODO: Might want to debounce this in the future, or take into account the actual resize - // values. Maybe we want to keep the current implementation in case the resize event might - // not fire... not sure. Event::Resize(_, _) => { + // TODO: Might want to debounce this in the future, or take into account the actual resize + // values. Maybe we want to keep the current implementation in case the resize event might + // not fire... not sure. + if sender.send(BottomEvent::Resize).is_err() { break; } @@ -449,8 +449,7 @@ pub fn create_input_thread( } } Event::Key(key) if key.kind == KeyEventKind::Press => { - // For now, we only care about keydown events. This may change in the future. - + // For now, we only care about key down events. This may change in the future. if sender.send(BottomEvent::KeyInput(key)).is_err() { break; } @@ -472,7 +471,9 @@ pub fn create_input_thread( } } }, - _ => (), + Event::Key(_) => {} + Event::FocusGained => {} + Event::FocusLost => {} } } } -- cgit v1.2.3