[evolution-data-server/gnome-3-16] Bug 747638 - Skipped changed messages in camel_folder_summary_get_changed()



commit 8d28edaf26209e6d8b4e36ff0a6709b42f0b835f
Author: Milan Crha <mcrha redhat com>
Date:   Thu Apr 16 08:09:51 2015 +0200

    Bug 747638 - Skipped changed messages in camel_folder_summary_get_changed()

 camel/camel-folder-summary.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 88bc793..79d2b2e 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -2003,15 +2003,15 @@ perform_content_info_load_from_db (CamelFolderSummary *summary,
 }
 
 static void
-gather_dirty_uids (gpointer key,
-                   gpointer value,
-                   gpointer user_data)
+gather_dirty_or_flagged_uids (gpointer key,
+                             gpointer value,
+                             gpointer user_data)
 {
        const gchar *uid = key;
        CamelMessageInfoBase *info = value;
        GHashTable *hash = user_data;
 
-       if (info->dirty)
+       if (info->dirty || (info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0)
                g_hash_table_insert (hash, (gpointer) camel_pstring_strdup (uid), GINT_TO_POINTER (1));
 }
 
@@ -2041,7 +2041,7 @@ camel_folder_summary_get_changed (CamelFolderSummary *summary)
 
        camel_folder_summary_lock (summary);
 
-       g_hash_table_foreach (summary->priv->loaded_infos, gather_dirty_uids, hash);
+       g_hash_table_foreach (summary->priv->loaded_infos, gather_dirty_or_flagged_uids, hash);
        g_hash_table_foreach (summary->priv->uids, gather_changed_uids, hash);
 
        res = g_ptr_array_sized_new (g_hash_table_size (hash));


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