[evolution-data-server/gnome-3-4] Prefer camel_folder_summary_peek_loaded() when removing CamelMessageInfo
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-4] Prefer camel_folder_summary_peek_loaded() when removing CamelMessageInfo
- Date: Fri, 20 Jul 2012 06:11:13 +0000 (UTC)
commit b437af542407a8f1b6c3aef5f0ac1625b4f44a23
Author: Milan Crha <mcrha redhat com>
Date: Fri Jul 20 08:11:00 2012 +0200
Prefer camel_folder_summary_peek_loaded() when removing CamelMessageInfo
camel/providers/imapx/camel-imapx-server.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index a47e8d4..f96e081 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1006,10 +1006,12 @@ imapx_expunge_uid_from_summary (CamelIMAPXServer *is,
if (is->changes == NULL)
is->changes = camel_folder_change_info_new ();
- mi = camel_folder_summary_get (is->select_folder->summary, uid);
+ mi = camel_folder_summary_peek_loaded (is->select_folder->summary, uid);
if (mi) {
camel_folder_summary_remove (is->select_folder->summary, mi);
camel_message_info_free (mi);
+ } else {
+ camel_folder_summary_remove_uid (is->select_folder->summary, uid);
}
is->expunged = g_list_prepend (is->expunged, uid);
@@ -4640,10 +4642,12 @@ imapx_command_expunge_done (CamelIMAPXServer *is,
gchar *uid = uids->pdata[i];
CamelMessageInfo *mi;
- mi = camel_folder_summary_get (folder->summary, uid);
+ mi = camel_folder_summary_peek_loaded (folder->summary, uid);
if (mi) {
camel_folder_summary_remove (folder->summary, mi);
camel_message_info_free (mi);
+ } else {
+ camel_folder_summary_remove_uid (folder->summary, uid);
}
camel_folder_change_info_remove_uid (changes, uids->pdata[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]