From 33836c591d13c8e6cda72a56bef4d3edd3e54ad5 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Fri, 17 Apr 2020 16:09:31 +0200 Subject: [PATCH] always update status, not only when last update arrives --- asyncgit/src/status.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/asyncgit/src/status.rs b/asyncgit/src/status.rs index c1a91b0e..8f7c4b3a 100644 --- a/asyncgit/src/status.rs +++ b/asyncgit/src/status.rs @@ -61,12 +61,11 @@ impl AsyncStatus { rayon_core::spawn(move || { let res = Self::get_status(); trace!("status fetched: {}", hash(&res)); - let mut notify = false; + { let mut current = arc_current.lock().unwrap(); if current.0 == hash_request { current.1 = Some(res.clone()); - notify = true; } } @@ -75,11 +74,9 @@ impl AsyncStatus { *last = res; } - if notify { - sender - .send(AsyncNotification::Status) - .expect("error sending status"); - } + sender + .send(AsyncNotification::Status) + .expect("error sending status"); }); None