Tie bundled files update to initialization rather than timeout

This commit is contained in:
Dan Stillman 2013-08-12 02:49:26 -04:00
parent 5787b230f7
commit 391b2085b3

View file

@ -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;
});