diff options
| author | pablu <me@pablu.de> | 2026-05-19 20:51:10 +0200 |
|---|---|---|
| committer | pablu <me@pablu.de> | 2026-05-19 20:51:10 +0200 |
| commit | afe649e0efc31fcd33a828e54bd6313cd37f1784 (patch) | |
| tree | c2cec9450cc1778f62c6339dad9c8f7d43c46b16 /src/event.rs | |
| parent | a6b4b29aaa222fa5c2f30cad233e97cb8125f96f (diff) | |
Add available package loading, update README.md, use eyre_color::Result
Diffstat (limited to 'src/event.rs')
| -rw-r--r-- | src/event.rs | 16 |
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(), |
