aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-folder-cache.c10
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);