feat(gui): better search with automatic tree expansion, directories scanning and caching

This commit is contained in:
Tarasov Aleksandr
2026-07-24 23:49:10 +03:00
committed by GitHub
parent 6d7abdbf53
commit 0c3d7cbd35
7 changed files with 433 additions and 109 deletions
+8
View File
@@ -8,9 +8,12 @@ use egui::Id;
use std::{
collections::{HashMap, HashSet},
path::PathBuf,
sync::{Arc, Mutex},
time::Instant,
};
pub type ScanResult = (PathBuf, Vec<PathBuf>, HashMap<PathBuf, Vec<PathBuf>>);
#[derive(Default, Debug)]
pub struct TrackUiState {
pub position_slider_value: f32,
@@ -50,6 +53,11 @@ pub struct AppState {
pub listed_dirs: HashSet<PathBuf>,
pub dir_cache: HashMap<PathBuf, Vec<PathBuf>>,
pub scanning_dirs: Arc<Mutex<HashSet<PathBuf>>>,
pub scanned_this_session: HashSet<PathBuf>,
pub finished_scans: Arc<Mutex<Vec<ScanResult>>>,
pub recursive_files_cache: HashMap<PathBuf, Vec<PathBuf>>,
pub show_hotkeys: bool,
pub hotkey_capture_active: bool,