aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap4/camel-imap4-summary.c12
-rw-r--r--camel/providers/imap4/camel-imap4-summary.h1
2 files changed, 4 insertions, 9 deletions
diff --git a/camel/providers/imap4/camel-imap4-summary.c b/camel/providers/imap4/camel-imap4-summary.c
index f5fec4d05e..ef08974572 100644
--- a/camel/providers/imap4/camel-imap4-summary.c
+++ b/camel/providers/imap4/camel-imap4-summary.c
@@ -107,7 +107,6 @@ camel_imap4_summary_init (CamelIMAP4Summary *summary, CamelIMAP4SummaryClass *kl
folder_summary->message_info_size = sizeof (CamelIMAP4MessageInfo);
summary->update_flags = TRUE;
- summary->exists_changed = FALSE;
summary->uidvalidity_changed = FALSE;
}
@@ -1010,11 +1009,7 @@ camel_imap4_summary_set_exists (CamelFolderSummary *summary, guint32 exists)
g_return_if_fail (CAMEL_IS_IMAP4_SUMMARY (summary));
- if (imap4_summary->exists == exists)
- return;
-
imap4_summary->exists = exists;
- imap4_summary->exists_changed = TRUE;
}
void
@@ -1131,14 +1126,14 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException *
g_return_val_if_fail (CAMEL_IS_IMAP4_SUMMARY (summary), -1);
engine = ((CamelIMAP4Store *) imap4_summary->folder->parent_store)->engine;
+ scount = camel_folder_summary_count (summary);
if (imap4_summary->uidvalidity_changed) {
first = 1;
- } else if (imap4_summary->update_flags || imap4_summary->exists_changed) {
+ } else if (imap4_summary->update_flags || imap4_summary->exists < scount) {
/* this both updates flags and removes messages which
* have since been expunged from the server by another
* client */
- scount = camel_folder_summary_count (summary);
ic = imap4_summary_fetch_flags (summary, 1, scount);
while ((id = camel_imap4_engine_iterate (engine)) < ic->id && id != -1)
@@ -1155,6 +1150,8 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException *
first = scount + 1;
camel_imap4_command_unref (ic);
+ } else {
+ first = scount;
}
if (first != 0 && imap4_summary->exists > 0) {
@@ -1178,7 +1175,6 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException *
}
imap4_summary->update_flags = FALSE;
- imap4_summary->exists_changed = FALSE;
imap4_summary->uidvalidity_changed = FALSE;
return 0;
diff --git a/camel/providers/imap4/camel-imap4-summary.h b/camel/providers/imap4/camel-imap4-summary.h
index 3bad898a6a..23218ff804 100644
--- a/camel/providers/imap4/camel-imap4-summary.h
+++ b/camel/providers/imap4/camel-imap4-summary.h
@@ -60,7 +60,6 @@ struct _CamelIMAP4Summary {
guint32 uidvalidity;
guint uidvalidity_changed:1;
- guint exists_changed:1;
guint update_flags:1;
};