Send AccountStatusChange event on receiving mailboxes

master
Manos Pitsidianakis 2020-08-26 19:59:27 +03:00
parent 843616221e
commit ca0f37e1f3
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 5 additions and 0 deletions

View File

@ -1455,6 +1455,11 @@ impl Account {
match self.active_jobs.remove(job_id).unwrap() {
JobRequest::Mailboxes(_, ref mut chan) => {
if let Some(mailboxes) = chan.try_recv().unwrap() {
self.sender
.send(ThreadEvent::UIEvent(UIEvent::AccountStatusChange(
self.hash,
)))
.unwrap();
if let Err(err) = mailboxes.and_then(|mailboxes| self.init(mailboxes)) {
if err.kind.is_authentication() {
self.sender