From 30cb297c085322e7e2fe50e858f8df80565ac39a Mon Sep 17 00:00:00 2001 From: alexander chumakov Date: Wed, 17 Feb 2010 12:40:39 +0300 Subject: [PATCH] Emit the folder updated signal on message move --- src/modest-mail-operation.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 7eef26e..1f9ad21 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -3516,6 +3516,34 @@ transfer_msgs_cb (TnyFolder *folder, gboolean cancelled, GError *err, gpointer u } if (finished) { + TnyAccount *src_account; + TnyAccount *dest_account; + + /* send the notification that the source folder might have changed */ + src_account = modest_tny_folder_get_account (folder); + if (src_account) { + const gchar *src_folder_id; + const gchar *src_account_name; + + src_folder_id = tny_folder_get_id (folder); + src_account_name = + modest_tny_account_get_parent_modest_account_name_for_server_account (src_account); + modest_platform_emit_folder_updated_signal (src_account_name, src_folder_id); + g_object_unref (src_account); + } + /* send the notification that the destination folder might have changed */ + dest_account = modest_tny_folder_get_account (helper->dest_folder); + if (dest_account) { + const gchar *dest_folder_id; + const gchar *dest_account_name; + + dest_folder_id = tny_folder_get_id (helper->dest_folder); + dest_account_name = + modest_tny_account_get_parent_modest_account_name_for_server_account (dest_account); + modest_platform_emit_folder_updated_signal (dest_account_name, dest_folder_id); + g_object_unref (dest_account); + } + /* Synchronize the source folder contents. This should be done by tinymail but the camel_folder_sync it's actually disabled in transfer_msgs_thread_clean -- 1.7.9.5