diff options
author | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-11 14:08:04 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-11 14:08:04 +0800 |
commit | 26db788bff672e61505b18df26e491a7a0000f84 (patch) | |
tree | 3b916dfec6f85e1ffb8213d7d3f9d899829eea0c /camel | |
parent | 5857dc2c50a3f5d1b07c97c5a43482c75148ad01 (diff) | |
download | gsoc2013-evolution-26db788bff672e61505b18df26e491a7a0000f84.tar gsoc2013-evolution-26db788bff672e61505b18df26e491a7a0000f84.tar.gz gsoc2013-evolution-26db788bff672e61505b18df26e491a7a0000f84.tar.bz2 gsoc2013-evolution-26db788bff672e61505b18df26e491a7a0000f84.tar.lz gsoc2013-evolution-26db788bff672e61505b18df26e491a7a0000f84.tar.xz gsoc2013-evolution-26db788bff672e61505b18df26e491a7a0000f84.tar.zst gsoc2013-evolution-26db788bff672e61505b18df26e491a7a0000f84.zip |
(camel_imap4_summary_flush_updates): Added some logic to
distinguish between EXISTS value changing because it changed and
because messages got expunged.
svn path=/trunk/; revision=26302
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 3 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-summary.c | 7 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-summary.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 1b4b290185..cb94e4a994 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -15,6 +15,9 @@ were removed or otherwise updated. (camel_imap4_summary_expunge): Use seqid-1 to determine the actual summary index. + (camel_imap4_summary_flush_updates): Added some logic to + distinguish between EXISTS value changing because it changed and + because messages got expunged. * providers/imap4/camel-imap4-folder.c (imap4_sync): Flush updates after an EXPUNGE and don't unset expunge if we didn't delete diff --git a/camel/providers/imap4/camel-imap4-summary.c b/camel/providers/imap4/camel-imap4-summary.c index 70a92a1d1a..fa7cd7778a 100644 --- a/camel/providers/imap4/camel-imap4-summary.c +++ b/camel/providers/imap4/camel-imap4-summary.c @@ -1065,6 +1065,8 @@ camel_imap4_summary_expunge (CamelFolderSummary *summary, int seqid) if (!(info = camel_folder_summary_index (summary, seqid - 1))) return; + imap4_summary->expunged_changed = TRUE; + changes = camel_folder_change_info_new (); camel_folder_change_info_remove_uid (changes, camel_message_info_uid (info)); camel_object_trigger_event (imap4_summary->folder, "folder_changed", changes); @@ -1102,6 +1104,11 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException * engine = ((CamelIMAP4Store *) imap4_summary->folder->parent_store)->engine; + if (imap4_summary->expunged_changed && imap4_summary->exists_changed) { + if (imap4_summary->exists == camel_folder_summary_count (summary)) + imap4_summary->exists_changed = FALSE; + } + if (imap4_summary->uidvalidity_changed) { first = 1; } else if (imap4_summary->exists_changed && imap4_summary->exists > 0) { diff --git a/camel/providers/imap4/camel-imap4-summary.h b/camel/providers/imap4/camel-imap4-summary.h index 6b5e906960..9546a7923d 100644 --- a/camel/providers/imap4/camel-imap4-summary.h +++ b/camel/providers/imap4/camel-imap4-summary.h @@ -60,6 +60,7 @@ struct _CamelIMAP4Summary { guint32 uidvalidity; guint uidvalidity_changed:1; + guint expunged_changed; guint exists_changed:1; }; |