diff options
author | Dan Winship <danw@src.gnome.org> | 2001-08-06 21:19:13 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-08-06 21:19:13 +0000 |
commit | 39b22089188cf06b3428a4de47ada6dc342bc210 (patch) | |
tree | 2e64c7f514f048966c344385077ab4b008c9e651 | |
parent | d7c69d86e0e11bfdd41966a795d839346e1e09fe (diff) | |
download | evolution-data-server-39b22089188cf06b3428a4de47ada6dc342bc210.tar.gz |
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.
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 3bf218d17..05df802ff 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-08-06 Dan Winship <danw@ximian.com> + + * 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 <peterw@ximian.com> 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 4f8571bfa..62df070f2 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); |