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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -114,7 +114,21 @@ export default {
query = query.substr(1) query = query.substr(1)
} }
const ncache = {}
lists = (Object.values(this.$store.state.lists).filter(l => { 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()) return l.title.toLowerCase().includes(query.toLowerCase())
}) ?? []) }) ?? [])
} }