diff --git a/src/components/namespace/namespace-settings-dropdown.vue b/src/components/namespace/namespace-settings-dropdown.vue index fb71ba66a..e5381cac1 100644 --- a/src/components/namespace/namespace-settings-dropdown.vue +++ b/src/components/namespace/namespace-settings-dropdown.vue @@ -79,11 +79,9 @@ onMounted(() => { function setSubscriptionInStore(sub: ISubscription) { subscription.value = sub - namespaceStore.setNamespaces([ - { - ...props.namespace, - subscription: sub, - }, - ]) + namespaceStore.setNamespaceById({ + ...props.namespace, + subscription: sub, + }) } diff --git a/src/stores/namespaces.ts b/src/stores/namespaces.ts index 5d83948ba..913c37efa 100644 --- a/src/stores/namespaces.ts +++ b/src/stores/namespaces.ts @@ -84,6 +84,13 @@ export const useNamespaceStore = defineStore('namespace', { if (!namespace.lists || namespace.lists.length === 0) { namespace.lists = this.namespaces[namespaceIndex].lists } + + // Check for each list in that namespace if it has a subscription and set it if not + namespace.lists.forEach(l => { + if (l.subscription === null || l.subscription.entity !== 'list') { + l.subscription = namespace.subscription + } + }) this.namespaces[namespaceIndex] = namespace update(namespace)