always update status, not only when last update arrives

This commit is contained in:
Stephan Dilly 2020-04-17 16:09:31 +02:00
parent 75b729cca9
commit 33836c591d

View file

@ -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