Total count on folder_update
- From: Sergio Villar Senin <svillar igalia com>
- To: tinymail-devel-list gnome org
- Subject: Total count on folder_update
- Date: Tue, 20 Nov 2007 12:06:21 +0100
Hi,
I think that tinymail is not updating correctly the total count of
messages in a folder in folder_changed method of TnyCamelFolder. It only
cares about the unread status. See the attached patch for the fix.
Br
Index: libtinymail-camel/tny-camel-folder.c
===================================================================
--- libtinymail-camel/tny-camel-folder.c (revision 2979)
+++ libtinymail-camel/tny-camel-folder.c (working copy)
@@ -351,6 +351,7 @@
summary = priv->folder->summary;
if (!change && info->uid_changed != NULL && info->uid_changed->len > 0) {
+ priv->cached_length = camel_folder_get_message_count (priv->folder);
priv->unread_length = camel_folder_get_unread_message_count (priv->folder);
urcnted = TRUE;
change = tny_folder_change_new (TNY_FOLDER (self));
@@ -359,6 +360,7 @@
if (info->uid_added && info->uid_added->len > 0)
{
if (!urcnted) {
+ priv->cached_length = camel_folder_get_message_count (priv->folder);
priv->unread_length = camel_folder_get_unread_message_count (priv->folder);
urcnted = TRUE;
}
@@ -392,6 +394,7 @@
if (info->uid_removed && info->uid_removed->len > 0)
{
if (!urcnted) {
+ priv->cached_length = camel_folder_get_message_count (priv->folder);
priv->unread_length = camel_folder_get_unread_message_count (priv->folder);
urcnted = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]