commit 391b2085b392fcb931bd20647cd704e9bfc48959
parent 5787b230f7d81abbae6ca1956fb0c2c31c18b959
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 12 Aug 2013 02:49:26 -0400
Tie bundled files update to initialization rather than timeout
Diffstat:
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js
@@ -138,14 +138,16 @@ Zotero.Schema = new function(){
}
// After a delay, start update of bundled files and repo updates
- setTimeout(function () {
+ Zotero.initializationPromise
+ .delay(5000)
+ .then(function () {
Zotero.UnresponsiveScriptIndicator.disable();
- Zotero.Schema.updateBundledFiles(null, false, true)
+ return Zotero.Schema.updateBundledFiles(null, false, true)
.finally(function () {
- Zotero.UnresponsiveScriptIndicator.enable();
- })
- .done();
- }, 5000);
+ Zotero.UnresponsiveScriptIndicator.enable();
+ });
+ })
+ .done();
return updated;
});