2007-08-17 [colin] 2.10.0cvs128
[claws.git] / src / folder.c
index 8e06c7a6a34aa5b7ae48b6ceabd006d4748a4fee..85eb5654ada5463aabc5bb89d95dea6867ae9509 100644 (file)
@@ -1788,7 +1788,6 @@ static gint syncronize_flags(FolderItem *item, MsgInfoList *msglist)
 
        relation = g_relation_new(2);
        g_relation_index(relation, 0, g_direct_hash, g_direct_equal);
-       folder_item_set_batch(item, TRUE);
        if ((ret = item->folder->klass->get_flags(
            item->folder, item, msglist, relation)) == 0) {
                GTuples *tuples;
@@ -1797,6 +1796,7 @@ static gint syncronize_flags(FolderItem *item, MsgInfoList *msglist)
                gboolean skip;
 
                folder_item_update_freeze();
+               folder_item_set_batch(item, TRUE);
                for (cur = msglist; cur != NULL; cur = g_slist_next(cur)) {
                        msginfo = (MsgInfo *) cur->data;
                
@@ -1814,9 +1814,9 @@ static gint syncronize_flags(FolderItem *item, MsgInfoList *msglist)
                                        ~permflags & msginfo->flags.perm_flags, 0);
                        }
                }
+               folder_item_set_batch(item, FALSE);
                folder_item_update_thaw();
        }
-       folder_item_set_batch(item, FALSE);
        g_relation_destroy(relation);   
 
        return ret;