From: Brendan Cully Date: Sat, 17 May 2008 19:02:24 +0000 (-0700) Subject: Use context to get IMAP new message count in mailbox browser if possible. X-Git-Tag: mutt-1-5-18-rel~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d34df7a6c19f57030d8f3b7d00acea7a4a15966;p=mutt Use context to get IMAP new message count in mailbox browser if possible. --- diff --git a/imap/browse.c b/imap/browse.c index 4654c48e..750a65da 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -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;