g_warning ("%s: could not get outbox", __FUNCTION__);
num_messages = 0;
}
-
+
if (num_messages != 0) {
ModestMailOperation *mail_op;
/* Reenable suspended items */
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
modest_mail_operation_queue_wakeup (mail_op, MODEST_TNY_SEND_QUEUE (send_queue));
-
+
/* Try to send */
- tny_camel_send_queue_flush (TNY_CAMEL_SEND_QUEUE (send_queue));
modest_tny_send_queue_set_requested_send_receive (MODEST_TNY_SEND_QUEUE (send_queue),
info->interactive);
}
g_slice_free (ModestMailOperationState, state);
}
-
static void
transfer_folder_cb (TnyFolder *folder,
gboolean cancelled,
ModestMailOperationPrivate *priv = NULL;
helper = (XFerFolderAsyncHelper *) user_data;
- g_return_if_fail (helper != NULL);
+ g_return_if_fail (helper != NULL);
self = helper->mail_op;
priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self);
priv->done = 1;
priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
}
-
+
+ /* Update state of new folder */
+ tny_folder_refresh_async (new_folder, NULL, NULL, NULL);
+ tny_folder_poke_status (new_folder);
+
/* Notify about operation end */
modest_mail_operation_notify_end (self);
priv = MODEST_MAIL_OPERATION_GET_PRIVATE (mail_op);
priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
+ tny_camel_send_queue_flush (TNY_CAMEL_SEND_QUEUE (queue));
/* Notify end */
modest_mail_operation_notify_end (mail_op);