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: 2019-10-25~671^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbb7c077f63aa21dca8f64d74bc85f65660cdc23;p=neomutt 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/mbox.c b/mbox/mbox.c index 60e8f91f6..c99256531 100644 --- a/mbox/mbox.c +++ b/mbox/mbox.c @@ -1007,7 +1007,6 @@ static int mbox_mbox_sync(struct Context *ctx, int *index_hint) if ((i == MUTT_NEW_MAIL) || (i == MUTT_REOPENED)) { /* new mail arrived, or mailbox reopened */ - need_sort = i; rc = i; goto bail; }