status->uidvalidity = num;
else if (strcasecmp(key, "UNSEEN") == 0)
status->unseen = num;
+ else if (strcasecmp(key, "DELETED") == 0)
+ status->deleted = num;
else if (strcasecmp(key, "HIGHESTMODSEQ") == 0 &&
imapc_mailbox_has_modseqs(storage->cur_status_box))
status->highest_modseq = num;
if ((items & STATUS_RECENT) != 0 &&
(box->enabled_features & MAILBOX_FEATURE_IMAP4REV2) == 0)
str_append(str, " RECENT");
+ if ((items & STATUS_DELETED) != 0)
+ str_append(str, " DELETED");
if ((items & STATUS_UIDNEXT) != 0)
str_append(str, " UIDNEXT");
if ((items & STATUS_UIDVALIDITY) != 0)
return 0;
}
+ if (imapc_client_is_server_selected(mbox->storage->client->client,
+ mailbox_get_name(box))) {
+ /* Our local imap session is no longer selecting the folder,
+ (this is handled in the imap layer above us), but the remote
+ side still has the mailbox selected. This would cause the
+ STATUS command below to not work as intended - so, deselect
+ on the remote side */
+ if (imapc_server_unselect(mbox->storage->client) < 0)
+ return -1;
+ }
+
imapc_simple_context_init(&sctx, mbox->storage->client);
mbox->storage->cur_status_box = mbox;
mbox->storage->cur_status = status_r;