diff options
Diffstat (limited to 'src/event.rs')
| -rw-r--r-- | src/event.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/event.rs b/src/event.rs index b3a0e8f..81cf6bd 100644 --- a/src/event.rs +++ b/src/event.rs @@ -15,10 +15,8 @@ pub fn handle_event(app: &mut App) -> io::Result<bool> { crate::app::ViewState::InstalledPackages => { if app.showing_search_window { handle_search_keybinds(key, app); - } else { - if handle_installed_packages_keybinds(key, app) { - return Ok(true); - } + } else if handle_installed_packages_keybinds(key, app) { + return Ok(true); } } } @@ -33,12 +31,10 @@ fn handle_search_keybinds(key: KeyEvent, app: &mut App) { KeyCode::Enter => { app.search(); app.toggle_search_window(); - () } _ => { app.textarea.input_without_shortcuts(key); app.search_found = Some(app.search()); - () } } } @@ -54,7 +50,7 @@ fn handle_installed_packages_keybinds(key: KeyEvent, app: &mut App) -> bool { if selected < 30 { app.list_state.select(Some(0)); } else { - app.list_state.select(Some(selected - 30)) + app.list_state.select(Some(selected - 30)); } } } @@ -85,5 +81,5 @@ fn handle_dashboard_keybinds(key: KeyEvent, app: &mut App) -> bool { _ => {} } - return false; + false } |
