Fix slow display of citation dialog on first interaction with doc
This commit is contained in:
parent
b7a24a58fb
commit
97a045fe0f
|
@ -1174,6 +1174,7 @@ Zotero.Integration.Fields.prototype.addEditCitation = Zotero.Promise.coroutine(f
|
||||||
fieldIndexPromise, citationsByItemIDPromise, previewFn
|
fieldIndexPromise, citationsByItemIDPromise, previewFn
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Zotero.debug('Integration: Displaying citation dialogue');
|
||||||
if (Zotero.Prefs.get("integration.useClassicAddCitationDialog")) {
|
if (Zotero.Prefs.get("integration.useClassicAddCitationDialog")) {
|
||||||
Zotero.Integration.displayDialog('chrome://zotero/content/integration/addCitationDialog.xul',
|
Zotero.Integration.displayDialog('chrome://zotero/content/integration/addCitationDialog.xul',
|
||||||
'alwaysRaised,resizable', io);
|
'alwaysRaised,resizable', io);
|
||||||
|
@ -1351,23 +1352,10 @@ Zotero.Integration.Session.prototype.init = Zotero.Promise.coroutine(function *(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (haveFields && !Object.keys(this.citationsByIndex).length) {
|
|
||||||
// We should load up the fields on the first interaction with the document, so
|
|
||||||
// that we can display a list of existing citations, etc.
|
|
||||||
yield this.fields.get();
|
|
||||||
yield this.fields.updateSession(FORCE_CITATIONS_FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dontRunSetDocPrefs) return false;
|
if (dontRunSetDocPrefs) return false;
|
||||||
|
|
||||||
yield this.setDocPrefs();
|
yield this.setDocPrefs();
|
||||||
}
|
}
|
||||||
if (!Object.keys(this.citationsByIndex).length) {
|
|
||||||
// We should load up the fields on the first interaction with the document, so
|
|
||||||
// that we can display a list of existing citations, etc.
|
|
||||||
yield this.fields.get();
|
|
||||||
yield this.fields.updateSession(FORCE_CITATIONS_FALSE);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user