aboutsummaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorpablu <me@pablu.de>2026-05-19 20:51:10 +0200
committerpablu <me@pablu.de>2026-05-19 20:51:10 +0200
commitafe649e0efc31fcd33a828e54bd6313cd37f1784 (patch)
treec2cec9450cc1778f62c6339dad9c8f7d43c46b16 /src/event.rs
parenta6b4b29aaa222fa5c2f30cad233e97cb8125f96f (diff)
Add available package loading, update README.md, use eyre_color::Result
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/event.rs b/src/event.rs
index 81cf6bd..44a4c3e 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -19,12 +19,28 @@ pub fn handle_event(app: &mut App) -> io::Result<bool> {
return Ok(true);
}
}
+ crate::app::ViewState::AvailablePackages => {
+ if handle_available_packages_keybinds(key, app) {
+ return Ok(true);
+ }
+ }
}
}
Ok(false)
}
+fn handle_available_packages_keybinds(key: KeyEvent, app: &mut App<'_>) -> bool {
+ match key.code {
+ KeyCode::Char('q') => return true,
+ KeyCode::Tab => app.cycle_current_tab(),
+
+ _ => {}
+ }
+
+ false
+}
+
fn handle_search_keybinds(key: KeyEvent, app: &mut App) {
match key.code {
KeyCode::Esc => app.toggle_search_window(),