Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ impl eframe::App for App {
let tree = FileTree::scan(path);
let scan_time_ms = start_time.elapsed().as_secs_f64() * 1000.0;
let color_map = ColorMap::from_extensions(&tree.extensions);
// cause the tree view to refresh
ctx.data_mut(|d| d.clear());
self.state = AppState::Loaded(Box::new(LoadedState {
tree,
color_map,
Expand Down Expand Up @@ -188,6 +190,11 @@ impl LoadedState {
{
reveal_in_finder(&fs_path);
}

let rescan_btn = ui.add(egui::Button::new("\u{1F504} Rescan"));
if rescan_btn.clicked() {
self.pending_scan = Some(PathBuf::from(&self.tree.root_path));
}
});
});
});
Expand Down