Flag the message infos once they are synced.
authorChenthill Palanisamy <pchenthill@novell.com>
Wed, 2 Dec 2009 10:39:30 +0000 (16:09 +0530)
committerChenthill Palanisamy <pchenthill@novell.com>
Wed, 2 Dec 2009 10:41:00 +0000 (16:11 +0530)
camel/providers/imapx/camel-imapx-server.c

index 74f1845..e1cf5f2 100644 (file)
@@ -2132,12 +2132,15 @@ imapx_job_sync_changes_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
                                CamelIMAPXMessageInfo *info = camel_folder_summary_peek_info (job->folder->summary, 
                                                                                job->u.sync_changes.changed_uids->pdata[i]);
 
-                               if (info)
-                                       info->server_flags = ((CamelMessageInfoBase *)info)->flags & CAMEL_IMAPX_SERVER_FLAGS;
+                               info->server_flags = ((CamelMessageInfoBase *)info)->flags & CAMEL_IMAPX_SERVER_FLAGS;
+                               info->info.flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
+                               info->info.dirty = TRUE;
 
                                /* FIXME: move over user flags too */
                        }
                }
+
+               camel_folder_summary_touch (job->folder->summary);
                camel_dlist_remove((CamelDListNode *)job);
                camel_msgport_reply((CamelMsg *)job);
        }