From e4cddbad25a707b5e4ad9adcbae8a09ac5ebcea9 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Wed, 14 Oct 2020 20:16:54 +0300 Subject: [PATCH] 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 animation --- src/components/mail/view.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/mail/view.rs b/src/components/mail/view.rs index d4891d01..9f551434 100644 --- a/src/components/mail/view.rs +++ b/src/components/mail/view.rs @@ -334,6 +334,9 @@ impl MailView { pending_action: pending_action.take(), }; self.active_jobs.insert(job_id); + context + .replies + .push_back(UIEvent::StatusEvent(StatusEvent::NewJob(job_id))); } } Err(err) => { @@ -666,6 +669,9 @@ impl MailView { let verify_fut = crate::components::mail::pgp::verify(a.clone()); let handle = context.job_executor.spawn_specialized(verify_fut); active_jobs.insert(handle.job_id); + context.replies.push_back(UIEvent::StatusEvent( + StatusEvent::NewJob(handle.job_id), + )); acc.push(AttachmentDisplay::SignedPending { inner: a.clone(), job_id: handle.job_id, @@ -708,6 +714,9 @@ impl MailView { let handle = context.job_executor.spawn_specialized(decrypt_fut); active_jobs.insert(handle.job_id); + context.replies.push_back(UIEvent::StatusEvent( + StatusEvent::NewJob(handle.job_id), + )); acc.push(AttachmentDisplay::EncryptedPending { inner: a.clone(), handle,