From 4cbbf6af0bf74b0c850ce9ff6c2e5888eda42483 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 6 Aug 2001 21:19:13 +0000 Subject: Do a refresh_info on the selected folder before looking at its unread * providers/imap/camel-imap-store.c (get_folder_info_online): Do a refresh_info on the selected folder before looking at its unread count. Should fix bug #4944. svn path=/trunk/; revision=11710 --- camel/ChangeLog | 6 ++++++ camel/providers/imap/camel-imap-store.c | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 3bf218d170..05df802ff0 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-08-06 Dan Winship + + * providers/imap/camel-imap-store.c (get_folder_info_online): Do a + refresh_info on the selected folder before looking at its unread + count. Should fix bug #4944. + 2001-08-06 Peter Williams Completely hide the namespace from everything external to the IMAP diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 4f8571bfae..62df070f2a 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -1293,17 +1293,16 @@ get_folder_info_online (CamelStore *store, const char *top, && (g_strcasecmp (fi->name, "INBOX") != 0)) continue; - /* UW will give cached data for the currently selected - * folder. Grr. Well, I guess this also potentially - * saves us one IMAP command. + /* For the current folder, poke it to check for new + * messages and then report that number, rather than + * doing a STATUS command. */ if (imap_store->current_folder && !strcmp (imap_store->current_folder->full_name, fi->full_name)) { + camel_folder_refresh_info (imap_store->current_folder, NULL); fi->unread_message_count = camel_folder_get_unread_message_count (imap_store->current_folder); - continue; - } - - fi->unread_message_count = get_folder_status (imap_store, fi->full_name, "UNSEEN"); + } else + fi->unread_message_count = get_folder_status (imap_store, fi->full_name, "UNSEEN"); } g_ptr_array_free (folders, TRUE); -- cgit