]> granicus.if.org Git - neomutt/commitdiff
mx_fastclose_mailbox: use mailbox notifications
authorRichard Russon <rich@flatcap.org>
Thu, 20 Dec 2018 13:37:38 +0000 (13:37 +0000)
committerRichard Russon <rich@flatcap.org>
Sat, 5 Jan 2019 14:44:35 +0000 (14:44 +0000)
mailbox.c
mx.c

index 80996ab5347365ac1fd18d349d54318cc6070364..df7a15474b7842d5eb9c871feabb99a1b2abc860 100644 (file)
--- a/mailbox.c
+++ b/mailbox.c
@@ -112,6 +112,8 @@ void mailbox_free(struct Mailbox **m)
   if (!m || !*m)
     return;
 
+  mutt_mailbox_changed(*m, MBN_CLOSED);
+
   if (Context && Context->mailbox && Context->mailbox == *m)
   {
     mx_cleanup_context(Context);
diff --git a/mx.c b/mx.c
index d618c4f14350215fa3b981bd86fb4ab39d8b3b99..20e9e0ec700b834d0956838f2519914c168ad3b7 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -448,18 +448,19 @@ void mx_fastclose_mailbox(struct Context *ctx)
   if (m->mx_ops)
     m->mx_ops->mbox_close(m);
 
+  mutt_mailbox_changed(m, MBN_CLOSED);
+
   mutt_hash_free(&m->subj_hash);
   mutt_hash_free(&m->id_hash);
   mutt_hash_free(&m->label_hash);
+
   if (m->emails)
   {
-    mutt_clear_threads(ctx);
     for (int i = 0; i < m->msg_count; i++)
       mutt_email_free(&m->emails[i]);
     FREE(&m->emails);
   }
   FREE(&m->v2r);
-  mx_cleanup_context(ctx);
 }
 
 /**