From: Richard Russon Date: Sun, 23 Dec 2018 00:11:20 +0000 (+0000) Subject: imap_expunge_mailbox: use mailbox notifications X-Git-Tag: 2019-10-25~399^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=127a46d8ebc2cf26d08200ee305268f530b64ad8;p=neomutt imap_expunge_mailbox: use mailbox notifications --- diff --git a/imap/imap.c b/imap/imap.c index b932810ee..58e3ff40e 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -784,16 +784,11 @@ void imap_expunge_mailbox(struct Mailbox *m) return; struct Email *e = NULL; - short old_sort; #ifdef USE_HCACHE mdata->hcache = imap_hcache_open(adata, mdata); #endif - old_sort = Sort; - Sort = SORT_ORDER; - mutt_sort_headers(mdata->ctx, false); - for (int i = 0; i < m->msg_count; i++) { e = m->emails[i]; @@ -841,11 +836,7 @@ void imap_expunge_mailbox(struct Mailbox *m) imap_hcache_close(mdata); #endif - /* We may be called on to expunge at any time. We can't rely on the caller - * to always know to rethread */ - mx_update_tables(mdata->ctx, false); - Sort = old_sort; - mutt_sort_headers(mdata->ctx, true); + mutt_mailbox_changed(m, MBN_RESORT); } /**