From b6e3f5317702713cde5ba1e38686927479fa8f6e Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Mon, 3 Dec 2018 15:26:02 +0000 Subject: [PATCH] Call mx_update_context from mx_mbox_check, if needed --- mx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } /** -- 2.40.0