diff options
Diffstat (limited to 'worker/imap/worker.go')
-rw-r--r-- | worker/imap/worker.go | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go index 752eac52..8673c0ff 100644 --- a/worker/imap/worker.go +++ b/worker/imap/worker.go @@ -249,21 +249,8 @@ func (w *IMAPWorker) handleImapUpdate(update client.Update) { log.Tracef("(= %T", update) switch update := update.(type) { case *client.MailboxUpdate: - status := update.Mailbox - if w.selected.Name == status.Name { - w.selected = status - } - w.worker.PostMessage(&types.DirectoryInfo{ - Info: &models.DirectoryInfo{ - Flags: status.Flags, - Name: status.Name, - ReadOnly: status.ReadOnly, - - Exists: int(status.Messages), - Recent: int(status.Recent), - Unseen: int(status.Unseen), - Caps: w.caps, - }, + w.worker.PostAction(&types.CheckMail{ + Directories: []string{update.Mailbox.Name}, }, nil) case *client.MessageUpdate: msg := update.Message |