other: clean up some fixmes (#1171)
This commit is contained in:
parent
69318465ae
commit
6b9663a2c2
|
@ -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() {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
15
src/lib.rs
15
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 => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue