Refactor mouse and keyboard handlers with shared actions
All checks were successful
Build and Release / build-and-release (push) Successful in 1m24s

- Extract common action functions to eliminate code duplication
- Mouse left-click toggles folder open/close
- Mouse right-click plays selection (identical to Enter key)
- Add confirmation popup for library refresh operation
- Improve popup visibility with Clear widget
This commit is contained in:
2025-12-07 13:56:52 +01:00
parent 0cef231cd3
commit 248c5701fb
4 changed files with 257 additions and 61 deletions

View File

@@ -36,6 +36,7 @@ pub struct AppState {
pub visual_mode: bool,
pub visual_anchor: usize,
pub saved_expanded_dirs: HashSet<PathBuf>,
pub show_refresh_confirm: bool,
}
#[derive(Debug, Clone)]
@@ -77,6 +78,7 @@ impl AppState {
visual_mode: false,
visual_anchor: 0,
saved_expanded_dirs: HashSet::new(),
show_refresh_confirm: false,
}
}