Don't show archived lists/namespaces in quick actions

This commit is contained in:
kolaente 2021-07-06 15:00:31 +02:00
parent f68794bd01
commit e640f90488
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 14 additions and 0 deletions

View File

@ -114,7 +114,21 @@ export default {
query = query.substr(1)
}
const ncache = {}
lists = (Object.values(this.$store.state.lists).filter(l => {
if (l.isArchived) {
return false
}
if (typeof ncache[l.namespaceId] === 'undefined') {
ncache[l.namespaceId] = this.$store.getters['namespaces/getNamespaceById'](l.namespaceId)
}
if (ncache[l.namespaceId].isArchived) {
return false
}
return l.title.toLowerCase().includes(query.toLowerCase())
}) ?? [])
}