diff --git a/src/components/quick-actions/quick-actions.vue b/src/components/quick-actions/quick-actions.vue index 6f6209bd0..330e87066 100644 --- a/src/components/quick-actions/quick-actions.vue +++ b/src/components/quick-actions/quick-actions.vue @@ -109,11 +109,6 @@ export default { results() { let lists = [] if (this.searchMode === SEARCH_MODE_ALL || this.searchMode === SEARCH_MODE_LISTS) { - let query = this.query - if (this.searchMode === SEARCH_MODE_LISTS) { - query = query.substr(1) - } - const ncache = {} const history = getHistory() @@ -124,7 +119,9 @@ export default { }), ...Object.values(this.$store.state.lists)])] - lists = (allLists.filter(l => { + const {list} = this.parsedQuery + + lists = list === null ? [] : (allLists.filter(l => { if (typeof l === 'undefined' || l === null) { return false } @@ -141,7 +138,7 @@ export default { return false } - return l.title.toLowerCase().includes(query.toLowerCase()) + return l.title.toLowerCase().includes(list.toLowerCase()) }) ?? []) } @@ -249,10 +246,10 @@ export default { if (this.query.startsWith('#')) { return SEARCH_MODE_TASKS } - if (this.query.startsWith('*')) { + if (assignees.length === 0 && list !== null && text === '' && labels.length === 0) { return SEARCH_MODE_LISTS } - if (assignees.length > 0 && list === '' && text === '' && labels.length === 0) { + if (assignees.length > 0 && list === null && text === '' && labels.length === 0) { return SEARCH_MODE_TEAMS }