fix(subscription): don't remove every namespace but the one subscribing to
This commit is contained in:
parent
eae555475d
commit
f17bbeddec
@ -79,11 +79,9 @@ onMounted(() => {
|
||||
|
||||
function setSubscriptionInStore(sub: ISubscription) {
|
||||
subscription.value = sub
|
||||
namespaceStore.setNamespaces([
|
||||
{
|
||||
namespaceStore.setNamespaceById({
|
||||
...props.namespace,
|
||||
subscription: sub,
|
||||
},
|
||||
])
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
@ -85,6 +85,13 @@ export const useNamespaceStore = defineStore('namespace', {
|
||||
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)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user