Providing accurate local folder sizes



Hi,

find attached a patch that enables the recomputing of local folder sizes when removing a message or when transferring it from one folder to other.

Br
Index: tny-camel-folder.c
===================================================================
--- tny-camel-folder.c	(revision 3102)
+++ tny-camel-folder.c	(working copy)
@@ -1072,6 +1072,9 @@
 	/* Notify about unread count */
 	_tny_camel_folder_check_unread_count (TNY_CAMEL_FOLDER (self));
 
+	/* Reset local size info */
+	reset_local_size (priv);
+
 	/* Notify header has been removed */
 	change = tny_folder_change_new (self);
 	tny_folder_change_add_expunged_header (change, header);
@@ -1141,6 +1144,9 @@
 	/* Notify about unread count */
 	_tny_camel_folder_check_unread_count (TNY_CAMEL_FOLDER (self));
 
+	/* Reset local size info */
+	reset_local_size (priv);
+
 	/* Notify header has been removed */
 	notify_folder_observers_about_in_idle (self, change);
 
@@ -3848,6 +3854,10 @@
 		info->cancelled = camel_operation_cancel_check (apriv->cancel);
 		_tny_camel_account_stop_camel_operation (TNY_CAMEL_ACCOUNT (priv_src->account));
 
+		/* Reset local size info */
+		reset_local_size (priv_src);
+		reset_local_size (priv_dst);
+
 		/* Get data */
 		info->from_all = camel_folder_get_message_count (priv_src->folder);
 		info->to_all = camel_folder_get_message_count (priv_dst->folder);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]