]> granicus.if.org Git - mutt/commitdiff
Skip sort in mbox_sync_mailbox() when new/reopen occurs.
authorKevin McCarthy <kevin@8t8.us>
Wed, 25 Jul 2018 01:23:25 +0000 (18:23 -0700)
committerKevin McCarthy <kevin@8t8.us>
Wed, 25 Jul 2018 01:23:25 +0000 (18:23 -0700)
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().

mbox.c

diff --git a/mbox.c b/mbox.c
index 8ed1d16999038e1d5f16b9365220a3333ac07b23..265398ae6bac47ec3c7c053700cc108e662c056c 100644 (file)
--- 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;
   }