mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28: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 || {
|
rayon_core::spawn(move || {
|
||||||
let res = Self::get_status();
|
let res = Self::get_status();
|
||||||
trace!("status fetched: {}", hash(&res));
|
trace!("status fetched: {}", hash(&res));
|
||||||
let mut notify = false;
|
|
||||||
{
|
{
|
||||||
let mut current = arc_current.lock().unwrap();
|
let mut current = arc_current.lock().unwrap();
|
||||||
if current.0 == hash_request {
|
if current.0 == hash_request {
|
||||||
current.1 = Some(res.clone());
|
current.1 = Some(res.clone());
|
||||||
notify = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,11 +74,9 @@ impl AsyncStatus {
|
||||||
*last = res;
|
*last = res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if notify {
|
sender
|
||||||
sender
|
.send(AsyncNotification::Status)
|
||||||
.send(AsyncNotification::Status)
|
.expect("error sending status");
|
||||||
.expect("error sending status");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue