diff options
Diffstat (limited to 'camel/providers/imap')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index e18fbd0719..4e49e4a3e7 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -257,9 +257,12 @@ camel_imap_folder_new (CamelStore *parent, const char *folder_name, return NULL; } - if ((imap_store->parameters & IMAP_PARAM_FILTER_INBOX) && - !strcasecmp (folder_name, "INBOX")) - folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT; + if (!strcasecmp (folder_name, "INBOX")) { + if ((imap_store->parameters & IMAP_PARAM_FILTER_INBOX)) + folder->folder_flags |= CAMEL_FOLDER_FILTER_RECENT; + if (!camel_session_check_junk_for_imap (CAMEL_SERVICE (parent)->session)) + folder->folder_flags |= CAMEL_FOLDER_SUPRESS_JUNK_TEST; + } imap_folder->search = camel_imap_search_new(folder_dir); @@ -2393,6 +2396,12 @@ imap_update_summary (CamelFolder *folder, int exists, } g_ptr_array_free (fetch_data, TRUE); + /* update CAMEL_FOLDER_SUPRESS_JUNK_TEST flag, it may changed in session */ + if (camel_session_check_junk_for_imap (CAMEL_SERVICE (store)->session)) + folder->folder_flags &= ~CAMEL_FOLDER_SUPRESS_JUNK_TEST; + else + folder->folder_flags |= CAMEL_FOLDER_SUPRESS_JUNK_TEST; + /* And add the entries to the summary, etc. */ for (i = 0; i < messages->len; i++) { mi = messages->pdata[i]; |