[balsa] mailbox-local: Do not pass message to LBMailbox



commit d95c3a90b2478e9dcd18d50ba0bf4efd3a10f64b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Wed Feb 26 18:46:02 2020 -0500

    mailbox-local: Do not pass message to LBMailbox
    
    Do not pass message to LibBalsaMailbox for caching, when we're not
    preparing a threaded view.
    
    * libbalsa/mailbox_local.c (lbm_local_cache_message):

 ChangeLog                | 8 ++++++++
 libbalsa/mailbox_local.c | 8 +++++---
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ec8a8e4f8..8247c534b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-02-26  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       mailbox-local: Do not pass message to LibBalsaMailbox
+
+       for caching, when we're not preparing a threaded view.
+
+       * libbalsa/mailbox_local.c (lbm_local_cache_message):
+
 2020-02-26  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Use g_print() instead of g_printerr()
diff --git a/libbalsa/mailbox_local.c b/libbalsa/mailbox_local.c
index 0fa1e62c8..ddd54fe1c 100644
--- a/libbalsa/mailbox_local.c
+++ b/libbalsa/mailbox_local.c
@@ -1007,12 +1007,14 @@ lbm_local_cache_message(LibBalsaMailboxLocal * local,
     LibBalsaMailboxLocalInfo *info;
     LibBalsaMessageHeaders *headers;
 
-    libbalsa_mailbox_cache_message(LIBBALSA_MAILBOX(local), msgno,
-                                   message);
-
+    /* If we are not preparing the mailbox for viewing, there is nothing
+     * to do. */
     if (priv->threading_info == NULL)
         return;
 
+    libbalsa_mailbox_cache_message(LIBBALSA_MAILBOX(local), msgno,
+                                   message);
+
     if (priv->threading_info->len < msgno)
         g_ptr_array_set_size(priv->threading_info, msgno);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]