* Properly synchronizes the selected folder when closing the main window
[modest] / src / widgets / modest-folder-view.c
index e189605..8a9ba72 100644 (file)
@@ -1111,7 +1111,6 @@ modest_folder_view_finalize (GObject *obj)
                priv->query = NULL;
        }
 
-/*     modest_folder_view_disable_next_folder_selection (MODEST_FOLDER_VIEW(obj)); */
        if (priv->folder_to_select) {
                g_object_unref (G_OBJECT(priv->folder_to_select));
                priv->folder_to_select = NULL;
@@ -1131,16 +1130,6 @@ modest_folder_view_finalize (GObject *obj)
        }
 
        if (priv->cur_folder_store) {
-               if (TNY_IS_FOLDER(priv->cur_folder_store)) {
-                       ModestMailOperation *mail_op;
-
-                       mail_op = modest_mail_operation_new (NULL);
-                       modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
-                                                        mail_op);
-                       modest_mail_operation_sync_folder (mail_op, TNY_FOLDER (priv->cur_folder_store), FALSE);
-                       g_object_unref (mail_op);
-               }
-
                g_object_unref (priv->cur_folder_store);
                priv->cur_folder_store = NULL;
        }