aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-26 07:09:45 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-26 07:09:45 +0800
commit36da2069e0746be7da3377010500c124a3f26a45 (patch)
tree938cee59047eb3106563ed28d76c7f9cbdd97922 /mail/mail-folder-cache.c
parent6498968214fd4fb26675d3f068f7086eef5a2c4d (diff)
downloadgsoc2013-evolution-36da2069e0746be7da3377010500c124a3f26a45.tar
gsoc2013-evolution-36da2069e0746be7da3377010500c124a3f26a45.tar.gz
gsoc2013-evolution-36da2069e0746be7da3377010500c124a3f26a45.tar.bz2
gsoc2013-evolution-36da2069e0746be7da3377010500c124a3f26a45.tar.lz
gsoc2013-evolution-36da2069e0746be7da3377010500c124a3f26a45.tar.xz
gsoc2013-evolution-36da2069e0746be7da3377010500c124a3f26a45.tar.zst
gsoc2013-evolution-36da2069e0746be7da3377010500c124a3f26a45.zip
The folder-info needs to take priority over the folder because of the way
2001-09-25 Jeffrey Stedfast <fejj@ximian.com> * mail-folder-cache.c (update_1folder): The folder-info needs to take priority over the folder because of the way IMAP works (which is that it doesn't actually update the folders until you SELECT them and so when you do get_folder_info(), it doesn't actually SELECT the folders, it just STATUS's them). svn path=/trunk/; revision=13133
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 90ab1a805b..b29b1e9fc4 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -83,10 +83,14 @@ update_1folder(struct _folder_info *mfi, CamelFolderInfo *info)
LOCK(info_lock);
folder = mfi->folder;
if (folder) {
- if (CAMEL_IS_VTRASH_FOLDER(folder) || folder == outbox_folder)
+ if (CAMEL_IS_VTRASH_FOLDER (folder) || folder == outbox_folder) {
unread = camel_folder_get_message_count(folder);
- else
- unread = camel_folder_get_unread_message_count(folder);
+ } else {
+ if (info)
+ unread = (info->unread_message_count == -1) ? 0 : info->unread_message_count;
+ else
+ unread = camel_folder_get_unread_message_count (folder);
+ }
} else if (info)
unread = (info->unread_message_count==-1)?0:info->unread_message_count;
UNLOCK(info_lock);