* Fixes NB#93291, properly shown email size in details dialogs
[modest] / src / modest-mail-operation.c
index e4bd9c6..75aa517 100644 (file)
@@ -1329,8 +1329,7 @@ G_DEFINE_TYPE_WITH_CODE (InternalFolderObserver,
 static void
 foreach_add_item (gpointer header, gpointer user_data)
 {
-       tny_list_prepend (TNY_LIST (user_data), 
-                         G_OBJECT (header));
+       tny_list_append (TNY_LIST (user_data), G_OBJECT (header));
 }
 
 /* This is the method that looks for new messages in a folder */
@@ -1411,9 +1410,9 @@ update_account_send_mail (UpdateAccountInfo *info)
                return;
 
        /* Get the transport account */
-       transport_account = (TnyTransportAccount *)
-               modest_tny_account_store_get_transport_account_for_open_connection (account_store,
-                                                                                   info->account_name);
+       transport_account = (TnyTransportAccount *) 
+               modest_tny_account_store_get_server_account (account_store, info->account_name, 
+                                                            TNY_ACCOUNT_TYPE_TRANSPORT);
 
        if (transport_account) {
                ModestTnySendQueue *send_queue;
@@ -2773,13 +2772,14 @@ remove_msgs_async_cb (TnyFolder *folder,
                                                        account_name);  
        account_proto = modest_tny_account_get_protocol_type (account);
        g_object_unref (account);
-       
-       if (( (modest_protocol_registry_protocol_type_has_leave_on_server (protocol_registry, account_proto) && !leave_on_server) ||
-             modest_tny_folder_is_remote_folder (folder) == FALSE))
+
+       if ((modest_protocol_registry_protocol_type_has_leave_on_server (protocol_registry, account_proto) && 
+            !leave_on_server) ||
+           !modest_tny_folder_is_remote_folder (folder))
                expunge = TRUE;
        else
                expunge = FALSE;
-       
+
        /* Sync folder */
        tny_folder_sync_async(folder, expunge, sync_folder_finish_callback, 
                              NULL, self);