diff options
Diffstat (limited to 'src/interactive/app/app_state.rs')
-rw-r--r-- | src/interactive/app/app_state.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interactive/app/app_state.rs b/src/interactive/app/app_state.rs index 8986f09..f4a8d20 100644 --- a/src/interactive/app/app_state.rs +++ b/src/interactive/app/app_state.rs @@ -1,4 +1,6 @@ -use dua::{WalkResult, traverse::{TreeIndex, Tree}, inodefilter::InodeFilter}; +use std::time::Duration; + +use dua::{WalkResult, traverse::{TreeIndex, Tree}, inodefilter::InodeFilter, Throttle}; use petgraph::Direction; use super::{navigation::Navigation, EntryDataBundle, SortMode}; @@ -40,6 +42,7 @@ pub struct TraversalState { pub current_directory_at_depth: EntryInfo, pub previous_depth: usize, pub inodes: InodeFilter, + pub throttle: Option<Throttle> } impl TraversalState { @@ -51,6 +54,7 @@ impl TraversalState { current_directory_at_depth: EntryInfo::default(), previous_depth: 0, inodes: InodeFilter::default(), + throttle: Some(Throttle::new(Duration::from_millis(250), None)), } } } |