From 0a29197715f22602faf353fb8fe850150aa710d1 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 7 Oct 2022 18:15:00 +0200 Subject: [PATCH] fix: make sure subscriptions are properly inherited between namespaces and lists --- .../list/list-settings-dropdown.vue | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/list/list-settings-dropdown.vue b/src/components/list/list-settings-dropdown.vue index b56adcdcd..365485782 100644 --- a/src/components/list/list-settings-dropdown.vue +++ b/src/components/list/list-settings-dropdown.vue @@ -55,13 +55,13 @@ > {{ $t('menu.archive') }} - (null) watchEffect(() => { subscription.value = props.list.subscription ?? null @@ -100,4 +104,14 @@ watchEffect(() => { const configStore = useConfigStore() const backgroundsEnabled = computed(() => configStore.enabledBackgroundProviders?.length > 0) + +function setSubscriptionInStore(sub: ISubscription) { + subscription.value = sub + const updatedList = { + ...props.list, + subscription: sub, + } + listStore.setList(updatedList) + namespaceStore.setListInNamespaceById(updatedList) +}