Merge pull request #67 from zed-industries/delay-polling

Reintroduce the 100ms delay when polling worktree entries
This commit is contained in:
Nathan Sobo 2021-05-17 21:11:36 -06:00 committed by GitHub
commit c52968b18e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,6 +145,7 @@ impl Worktree {
if self.is_scanning() && !self.poll_scheduled {
ctx.spawn(|this, mut ctx| async move {
smol::Timer::after(Duration::from_millis(100)).await;
this.update(&mut ctx, |this, ctx| {
this.poll_scheduled = false;
this.poll_entries(ctx);