mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
always update status, not only when last update arrives
This commit is contained in:
parent
75b729cca9
commit
33836c591d
1 changed files with 4 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue