[evolution-data-server/gnome-2-30] Update summary uidnext after fetching messages.



commit a5501622f86ad1871cbbcdf761b4bedaa7a881e4
Author: David Woodhouse <David Woodhouse intel com>
Date:   Tue Jun 29 09:41:33 2010 +0100

    Update summary uidnext after fetching messages.
    
    Since we don't refetch flags if we've fetched new messages for a previously
    empty folder, we weren't updating the stored uidnext -- which meant we would
    refetch messages again next time. And if the folder is empty, we'd refetch
    messages every time and never update uidnext.
    (cherry picked from commit ed59c3b9eea32c3ae466872c9ca04f6d19cc3762)

 camel/providers/imapx/camel-imapx-server.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index e6ef425..d67f4c0 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3487,6 +3487,9 @@ imapx_job_scan_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 static void
 imapx_command_fetch_new_messages_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
+	CamelIMAPXSummary *isum = (CamelIMAPXSummary *)ic->job->folder->summary;
+	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)ic->job->folder;
+
 	if (camel_exception_is_set (ic->ex) || ic->status->result != IMAPX_OK) {
 		if (!camel_exception_is_set (ic->ex))
 			camel_exception_setv(ic->job->ex, 1, "Error fetching new messages : %s", ic->status->text);
@@ -3494,6 +3497,7 @@ imapx_command_fetch_new_messages_done (CamelIMAPXServer *is, CamelIMAPXCommand *
 			camel_exception_xfer (ic->job->ex, ic->ex);
 		goto exception;
 	}
+	isum->uidnext = ifolder->uidnext_on_server;
 
 	if (camel_folder_change_info_changed(ic->job->u.refresh_info.changes)) {
 		imapx_update_store_summary (ic->job->folder);



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