[evolution-mapi] Do not forget to save changes in CamelFolderSummary
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Do not forget to save changes in CamelFolderSummary
- Date: Thu, 1 Dec 2011 10:55:25 +0000 (UTC)
commit 6e724dac943f4e78a8b43d75f98020bba17641cb
Author: Milan Crha <mcrha redhat com>
Date: Thu Dec 1 11:54:43 2011 +0100
Do not forget to save changes in CamelFolderSummary
src/camel/camel-mapi-folder.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index f44ffe4..529078a 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -479,6 +479,8 @@ gather_changed_objects_to_slist (EMapiConnection *conn,
camel_message_info_set_flags (info, mask, flags);
minfo->server_flags = camel_message_info_flags (info);
minfo->info.dirty = TRUE;
+
+ camel_folder_summary_touch (gco->summary);
}
}
@@ -606,6 +608,7 @@ gather_object_offline_cb (EMapiConnection *conn,
}
minfo->info.dirty = TRUE;
+ camel_folder_summary_touch (gos->folder->summary);
if (is_new) {
camel_folder_summary_add (gos->folder->summary, info);
@@ -813,6 +816,7 @@ gather_object_summary_cb (EMapiConnection *conn,
}
minfo->info.dirty = TRUE;
+ camel_folder_summary_touch (gos->folder->summary);
if (is_new) {
camel_folder_summary_add (gos->folder->summary, info);
@@ -958,6 +962,7 @@ camel_mapi_folder_fetch_summary (CamelFolder *folder, GCancellable *cancellable,
mapi_summary->last_obj_total = fbp.obj_total;
}
+ camel_folder_summary_save_to_db (folder->summary, NULL);
camel_folder_thaw (folder);
return status;
@@ -1138,8 +1143,11 @@ static void
mapi_folder_dispose (GObject *object)
{
CamelStore *parent_store;
+ CamelFolder *folder = CAMEL_FOLDER (object);
CamelMapiFolder *mapi_folder = CAMEL_MAPI_FOLDER (object);
+ camel_folder_summary_save_to_db (folder->summary, NULL);
+
if (mapi_folder->cache != NULL) {
g_object_unref (mapi_folder->cache);
mapi_folder->cache = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]