From 04322d78087ef9ec428815ac107ecee3780b4f85 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sat, 25 Nov 2023 10:07:56 +0800 Subject: [PATCH] Add back a bit of debounce --- yazi-core/src/manager/watcher.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/yazi-core/src/manager/watcher.rs b/yazi-core/src/manager/watcher.rs index 682a88b6..3d862a57 100644 --- a/yazi-core/src/manager/watcher.rs +++ b/yazi-core/src/manager/watcher.rs @@ -133,9 +133,7 @@ impl Watcher { watched: Arc>>>, ) { // TODO: revert this once a new notification is implemented - // let rx = UnboundedReceiverStream::new(rx).chunks_timeout(100, - // Duration::from_millis(200)); - let rx = UnboundedReceiverStream::new(rx).chunks_timeout(1, Duration::ZERO); + let rx = UnboundedReceiverStream::new(rx).chunks_timeout(10, Duration::from_millis(20)); pin!(rx); while let Some(urls) = rx.next().await {