www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit d61fdeda4cbcfce365d348252c7e0ab3582da6dd
parent 315d9ecbcb7076476d8e747e24abe267d3b2676c
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 27 Feb 2012 16:34:24 -0500

Wait 5 seconds after launch for translator updates (bundled and repo)

This isn't ideal, since it could cause an unexplained delay a few
seconds after launch on slow systems, but it's better than delaying
startup. We'll make this non-blocking post-3.0.

Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 32++++++++++++++++----------------
Mchrome/content/zotero/xpcom/zotero.js | 1-
2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -205,26 +205,26 @@ Zotero.Schema = new function(){ Zotero.debug(e); } } - - try { - var up4 = this.updateBundledFiles(); - } - catch (e) { - Zotero.debug(e); - Zotero.logError(e); - } - - if (up2 || up3 || up4) { - // Run a manual scraper update if upgraded and pref set - if (Zotero.Prefs.get('automaticScraperUpdates')){ - this.updateFromRepository(2); - } - } } finally { Zotero.UnresponsiveScriptIndicator.enable(); } - return up1 || up2 || up3 || up4; + + // After a delay, start update of bundled files and repo updates + setTimeout(function () { + var up = Zotero.Schema.updateBundledFiles(); + if (up) { + // Run a manual scraper update if upgraded and pref set + if (Zotero.Prefs.get('automaticScraperUpdates')) { + Zotero.Schema.updateFromRepository(2); + } + } + else { + Zotero.Schema.updateFromRepository(); + } + }, 5000); + + return up1 || up2 || up3; } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -642,7 +642,6 @@ const ZOTERO_CONFIG = { } Zotero.DB.startDummyStatement(); - Zotero.Schema.updateFromRepository(); // Populate combined tables for custom types and fields -- this is likely temporary if (!upgraded && !updated) {