From: Pietro Cerutti Date: Mon, 3 Dec 2018 15:26:02 +0000 (+0000) Subject: Call mx_update_context from mx_mbox_check, if needed X-Git-Tag: 2019-10-25~466 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F1472%2Fhead;p=neomutt Call mx_update_context from mx_mbox_check, if needed --- diff --git a/mx.c b/mx.c index e9e649da6..efd2e425d 100644 --- a/mx.c +++ b/mx.c @@ -1120,8 +1120,13 @@ int mx_mbox_check(struct Context *ctx, int *index_hint) return -1; struct Mailbox *m = ctx->mailbox; + int rc = m->mx_ops->mbox_check(ctx, index_hint); + if (rc == MUTT_NEW_MAIL || rc == MUTT_REOPENED) + { + mx_update_context(ctx); + } - return m->mx_ops->mbox_check(ctx, index_hint); + return rc; } /**