Skip to content

Commit 33836c5

Browse files
author
Stephan Dilly
committed
always update status, not only when last update arrives
1 parent 75b729c commit 33836c5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

asyncgit/src/status.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ impl AsyncStatus {
6161
rayon_core::spawn(move || {
6262
let res = Self::get_status();
6363
trace!("status fetched: {}", hash(&res));
64-
let mut notify = false;
64+
6565
{
6666
let mut current = arc_current.lock().unwrap();
6767
if current.0 == hash_request {
6868
current.1 = Some(res.clone());
69-
notify = true;
7069
}
7170
}
7271

@@ -75,11 +74,9 @@ impl AsyncStatus {
7574
*last = res;
7675
}
7776

78-
if notify {
79-
sender
80-
.send(AsyncNotification::Status)
81-
.expect("error sending status");
82-
}
77+
sender
78+
.send(AsyncNotification::Status)
79+
.expect("error sending status");
8380
});
8481

8582
None

0 commit comments

Comments
 (0)