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) {
|
function setSubscriptionInStore(sub: ISubscription) {
|
||||||
subscription.value = sub
|
subscription.value = sub
|
||||||
namespaceStore.setNamespaces([
|
namespaceStore.setNamespaceById({
|
||||||
{
|
...props.namespace,
|
||||||
...props.namespace,
|
subscription: sub,
|
||||||
subscription: sub,
|
})
|
||||||
},
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -84,6 +84,13 @@ export const useNamespaceStore = defineStore('namespace', {
|
|||||||
if (!namespace.lists || namespace.lists.length === 0) {
|
if (!namespace.lists || namespace.lists.length === 0) {
|
||||||
namespace.lists = this.namespaces[namespaceIndex].lists
|
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
|
this.namespaces[namespaceIndex] = namespace
|
||||||
update(namespace)
|
update(namespace)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user