[evolution-data-server] I#89 - [IMAPx] Downloads content for offline in unsubscribed folders



commit 964ed1db13b460678c249b08d5f9a0ac0c58faf7
Author: Milan Crha <mcrha redhat com>
Date:   Tue Apr 30 19:53:50 2019 +0200

    I#89 - [IMAPx] Downloads content for offline in unsubscribed folders
    
    .. when "Show only subscribed folders" option is set.
    
    Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/89

 src/camel/providers/imapx/camel-imapx-store.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-store.c b/src/camel/providers/imapx/camel-imapx-store.c
index b4669dd17..887efc624 100644
--- a/src/camel/providers/imapx/camel-imapx-store.c
+++ b/src/camel/providers/imapx/camel-imapx-store.c
@@ -2860,15 +2860,23 @@ imapx_store_dup_downsync_folders (CamelOfflineStore *offline_store)
 {
        CamelStore *store;
        CamelFolderInfo *fi;
+       CamelSettings *settings;
        GPtrArray *folders = NULL;
+       guint32 flags;
 
        g_return_val_if_fail (CAMEL_IS_IMAPX_STORE (offline_store), NULL);
 
        store = CAMEL_STORE (offline_store);
+       settings = camel_service_ref_settings (CAMEL_SERVICE (store));
 
-       fi = get_folder_info_offline (store, NULL,
-               CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL,
-               NULL, NULL);
+       flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL;
+
+       if (camel_imapx_settings_get_use_subscriptions (CAMEL_IMAPX_SETTINGS (settings)))
+               flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
+
+       g_clear_object (&settings);
+
+       fi = get_folder_info_offline (store, NULL, flags, NULL, NULL);
 
        imapx_store_dup_downsync_folders_recurse (store, fi, &folders);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]