Don't search child items in "Title, Creator, Year" mode

They can't match, so there's no need to include them. This should speed
up "Title, Creator, Year" searches.
This commit is contained in:
Dan Stillman 2020-02-04 18:32:33 -05:00
parent 8fd83795e8
commit 4290f26d7c

View file

@ -355,6 +355,10 @@ Zotero.CollectionTreeRow.prototype.getSearchObject = Zotero.Promise.coroutine(fu
if (this.isTrash()) {
s2.addCondition('deleted', 'true');
}
// Don't search child items in "Title, Creator, Year" mode
if (Zotero.Prefs.get('search.quicksearch-mode') == 'titleCreatorYear') {
includeScopeChildren = false;
}
s2.setScope(s, includeScopeChildren);
if (this.searchText) {