[evolution-data-server] I#407 - IMAPx: Unsubscribed folder always removed from the UI
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] I#407 - IMAPx: Unsubscribed folder always removed from the UI
- Date: Tue, 12 Jul 2022 15:19:26 +0000 (UTC)
commit 11e8101bd95ac4d88c51f7335e5b579a29e35b30
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 12 17:18:42 2022 +0200
I#407 - IMAPx: Unsubscribed folder always removed from the UI
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/407
src/camel/providers/imapx/camel-imapx-store.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-store.c b/src/camel/providers/imapx/camel-imapx-store.c
index 09669afb2..d6c2f70d4 100644
--- a/src/camel/providers/imapx/camel-imapx-store.c
+++ b/src/camel/providers/imapx/camel-imapx-store.c
@@ -3177,12 +3177,20 @@ imapx_store_unsubscribe_folder_sync (CamelSubscribable *subscribable,
success = camel_imapx_conn_manager_unsubscribe_mailbox_sync (conn_man, mailbox, cancellable, error);
if (success) {
- CamelFolderInfo *fi;
+ CamelSettings *settings;
- fi = imapx_store_build_folder_info (
- CAMEL_IMAPX_STORE (subscribable), folder_name, 0);
- camel_subscribable_folder_unsubscribed (subscribable, fi);
- camel_folder_info_free (fi);
+ settings = camel_service_ref_settings (CAMEL_SERVICE (imapx_store));
+
+ /* Notify about unsubscribed folder only if showing subscribed folders only */
+ if (camel_imapx_settings_get_use_subscriptions (CAMEL_IMAPX_SETTINGS (settings))) {
+ CamelFolderInfo *fi;
+
+ fi = imapx_store_build_folder_info (imapx_store, folder_name, 0);
+ camel_subscribable_folder_unsubscribed (subscribable, fi);
+ camel_folder_info_free (fi);
+ }
+
+ g_clear_object (&settings);
}
exit:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]