From: Kevin McCarthy Date: Wed, 25 Jul 2018 01:23:25 +0000 (-0700) Subject: Skip sort in mbox_sync_mailbox() when new/reopen occurs. X-Git-Tag: mutt-1-11-rel~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b99841610124b2985b4828104f4dd303b5851b9;p=mutt Skip sort in mbox_sync_mailbox() when new/reopen occurs. Callers of mx_sync_mailbox() and mx_close_mailbox() already check for those cases and call update_index(). So remove the need_sort flag setting when mbox_check_mailbox() returns new/reopen inside mbox_sync_mailbox(). --- diff --git a/mbox.c b/mbox.c index 8ed1d169..265398ae 100644 --- a/mbox.c +++ b/mbox.c @@ -880,7 +880,6 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint) if ((i = mbox_check_mailbox (ctx, index_hint)) == MUTT_NEW_MAIL || i == MUTT_REOPENED) { /* new mail arrived, or mailbox reopened */ - need_sort = i; rc = i; goto bail; }