Limit Everything full-text-word subsearch to current library
This fixes an error using Everything if another library hasn't yet been loaded and should speed up Everything searches for people with multiple libraries. This is sort of an awkward fix, because it doesn't fix the underlying problem of `addCondition('libraryID', ...)` not working the same as `.libraryID =` for some search conditions that perform subsearches. But supporting `addCondition('libraryID', ...)` for those would get complicated, because there could technically be multiple such conditions, and applying those to a subsearch that used `AND` would get messy. So let's just fix the problem at hand. Fixes #3032
This commit is contained in:
parent
bba09658e1
commit
778fba60cb
1 changed files with 2 additions and 2 deletions
|
@ -350,7 +350,7 @@ Zotero.CollectionTreeRow.prototype.getSearchObject = Zotero.Promise.coroutine(fu
|
|||
}
|
||||
else {
|
||||
var s = new Zotero.Search();
|
||||
s.addCondition('libraryID', 'is', this.ref.libraryID);
|
||||
s.libraryID = this.ref.libraryID;
|
||||
// Library root
|
||||
if (this.isLibrary(true)) {
|
||||
s.addCondition('noChildren', 'true');
|
||||
|
@ -379,7 +379,7 @@ Zotero.CollectionTreeRow.prototype.getSearchObject = Zotero.Promise.coroutine(fu
|
|||
|
||||
// Create the outer (filter) search
|
||||
var s2 = new Zotero.Search();
|
||||
s2.addCondition('libraryID', 'is', this.ref.libraryID);
|
||||
s2.libraryID = this.ref.libraryID;
|
||||
|
||||
if (this.isTrash()) {
|
||||
s2.addCondition('deleted', 'true');
|
||||
|
|
Loading…
Reference in a new issue