[evolution] MailFolderCache notifies in reverse order
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] MailFolderCache notifies in reverse order
- Date: Thu, 7 Oct 2010 10:44:49 +0000 (UTC)
commit 8cd5fd9653ec82b5a9ffb7dcc42a42e86ce5d20e
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 7 12:43:58 2010 +0200
MailFolderCache notifies in reverse order
Causing unread count on Drafts disappear sometimes. (Drafts, like
Outbox, uses total message count, instead of real unread count).
mail/mail-folder-cache.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 9737417..f1c6fbd 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -286,7 +286,6 @@ update_1folder (MailFolderCache *self,
junked = folder->summary->junk_count;
if (junked > 0)
unread -= junked;
-
}
} else {
d(printf(" unread count\n"));
@@ -295,7 +294,7 @@ update_1folder (MailFolderCache *self,
else
unread = camel_folder_get_unread_message_count (folder);
}
- } else if (info)
+ } else if (info && !em_utils_folder_is_drafts (NULL, info->uri) && !em_utils_folder_is_outbox (NULL, info->uri))
unread = info->unread;
d(printf("folder updated: unread %d: '%s'\n", unread, mfi->full_name));
@@ -312,7 +311,7 @@ update_1folder (MailFolderCache *self,
up->msg_uid = g_strdup (msg_uid);
up->msg_sender = g_strdup (msg_sender);
up->msg_subject = g_strdup (msg_subject);
- g_queue_push_head (&self->priv->updates, up);
+ g_queue_push_tail (&self->priv->updates, up);
flush_updates (self);
}
@@ -435,7 +434,7 @@ unset_folder_info (MailFolderCache *self,
up->full_name = g_strdup (mfi->full_name);
up->uri = g_strdup (mfi->uri);
- g_queue_push_head (&self->priv->updates, up);
+ g_queue_push_tail (&self->priv->updates, up);
flush_updates (self);
}
}
@@ -478,7 +477,7 @@ setup_folder (MailFolderCache *self, CamelFolderInfo *fi, struct _store_info *si
if ((fi->flags & CAMEL_FOLDER_NOSELECT) == 0)
up->add = TRUE;
- g_queue_push_head (&self->priv->updates, up);
+ g_queue_push_tail (&self->priv->updates, up);
flush_updates (self);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]