mail/view: send NewJob event on new jobs
NewJob event wasn't sent so the message loading jobs were not accounted in the busy spinner animationjmap-eventsource
parent
67f50d95f4
commit
e4cddbad25
|
@ -334,6 +334,9 @@ impl MailView {
|
||||||
pending_action: pending_action.take(),
|
pending_action: pending_action.take(),
|
||||||
};
|
};
|
||||||
self.active_jobs.insert(job_id);
|
self.active_jobs.insert(job_id);
|
||||||
|
context
|
||||||
|
.replies
|
||||||
|
.push_back(UIEvent::StatusEvent(StatusEvent::NewJob(job_id)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
@ -666,6 +669,9 @@ impl MailView {
|
||||||
let verify_fut = crate::components::mail::pgp::verify(a.clone());
|
let verify_fut = crate::components::mail::pgp::verify(a.clone());
|
||||||
let handle = context.job_executor.spawn_specialized(verify_fut);
|
let handle = context.job_executor.spawn_specialized(verify_fut);
|
||||||
active_jobs.insert(handle.job_id);
|
active_jobs.insert(handle.job_id);
|
||||||
|
context.replies.push_back(UIEvent::StatusEvent(
|
||||||
|
StatusEvent::NewJob(handle.job_id),
|
||||||
|
));
|
||||||
acc.push(AttachmentDisplay::SignedPending {
|
acc.push(AttachmentDisplay::SignedPending {
|
||||||
inner: a.clone(),
|
inner: a.clone(),
|
||||||
job_id: handle.job_id,
|
job_id: handle.job_id,
|
||||||
|
@ -708,6 +714,9 @@ impl MailView {
|
||||||
let handle =
|
let handle =
|
||||||
context.job_executor.spawn_specialized(decrypt_fut);
|
context.job_executor.spawn_specialized(decrypt_fut);
|
||||||
active_jobs.insert(handle.job_id);
|
active_jobs.insert(handle.job_id);
|
||||||
|
context.replies.push_back(UIEvent::StatusEvent(
|
||||||
|
StatusEvent::NewJob(handle.job_id),
|
||||||
|
));
|
||||||
acc.push(AttachmentDisplay::EncryptedPending {
|
acc.push(AttachmentDisplay::EncryptedPending {
|
||||||
inner: a.clone(),
|
inner: a.clone(),
|
||||||
handle,
|
handle,
|
||||||
|
|
Loading…
Reference in New Issue