other: clean up some fixmes (#1171)

This commit is contained in:
Clement Tsang 2023-05-26 00:19:28 -04:00 committed by GitHub
parent 69318465ae
commit 6b9663a2c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -338,7 +338,8 @@ pub fn parse_query(
let mut condition: Option<QueryComparison> = None;
let mut value: Option<f64> = 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() {

View File

@ -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) => {

View File

@ -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 => {}
}
}
}