Load groups at startup, and make Zotero.Groups functions synchronous

Groups were already being loaded for the collections list, so we might
as well just store them initially and let Zotero.Libraries.getName() be
a synchronous call.
This commit is contained in:
Dan Stillman 2015-05-22 04:49:02 -04:00
parent f0b44b2047
commit 32abbe7c25
7 changed files with 61 additions and 49 deletions

View file

@ -596,7 +596,7 @@ function ZoteroProtocolHandler() {
// FIXME: Hack to exclude group libraries for now
var search = new Zotero.Search();
search.setScope(s);
var groups = yield Zotero.Groups.getAll();
var groups = Zotero.Groups.getAll();
for each(var group in groups) {
search.addCondition('libraryID', 'isNot', group.libraryID);
}