Commit 2d34df7a authored by Brendan Cully's avatar Brendan Cully

Use context to get IMAP new message count in mailbox browser if possible.

parent 75b9583b
......@@ -228,7 +228,12 @@ int imap_mailbox_state (const char* path, struct mailbox_state* state)
return -1;
if ((status = imap_mboxcache_get (idata, mx.mbox, 0)))
if (!imap_mxcmp(mx.mbox, idata->mailbox))
state->new = idata->ctx->new;
state->messages = idata->ctx->msgcount;
else if ((status = imap_mboxcache_get (idata, mx.mbox, 0)))
state->new = status->unseen;
state->messages = status->messages;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment