diff options
author | Milan Crha <mcrha@redhat.com> | 2010-10-07 18:44:52 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-10-07 18:44:52 +0800 |
commit | 1205b372ecdb7c3137e4aee4c4f770e4c2a0a0b3 (patch) | |
tree | 7fa3d86dc073f232818b6edbe22301ea883aea62 | |
parent | 294dd9184853ee74c38d34d6556913fa6a11bd0f (diff) | |
download | gsoc2013-evolution-1205b372ecdb7c3137e4aee4c4f770e4c2a0a0b3.tar.gz gsoc2013-evolution-1205b372ecdb7c3137e4aee4c4f770e4c2a0a0b3.tar.zst gsoc2013-evolution-1205b372ecdb7c3137e4aee4c4f770e4c2a0a0b3.zip |
MailFolderCache notifies in reverse order
Causing unread count on Drafts disappear sometimes. (Drafts, like
Outbox, uses total message count, instead of real unread count).
-rw-r--r-- | 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 c9493c8d1b..ea80080268 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -277,7 +277,6 @@ update_1folder (MailFolderCache *self, junked = folder->summary->junk_count; if (junked > 0) unread -= junked; - } } else { d(printf(" unread count\n")); @@ -286,7 +285,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)); @@ -303,7 +302,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); } @@ -426,7 +425,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); } } @@ -469,7 +468,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); } } |