diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-09-26 07:09:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-09-26 07:09:45 +0800 |
commit | 36da2069e0746be7da3377010500c124a3f26a45 (patch) | |
tree | 938cee59047eb3106563ed28d76c7f9cbdd97922 | |
parent | 6498968214fd4fb26675d3f068f7086eef5a2c4d (diff) | |
download | gsoc2013-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
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/mail-folder-cache.c | 10 |
2 files changed, 15 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 8f869194bb..344a50eaf4 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +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). + 2001-09-25 <NotZed@Ximian.com> * folder-browser.c (folder_browser_destroy): Deal with destroy vs 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); |