mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-07-26 05:46:59 +00:00
feat(gui): better search with automatic tree expansion, directories scanning and caching
This commit is contained in:
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user