commit 55c60a69ac1fe88ed374886140ab28d532a28dc4
parent 5a54466099615c9a818c02d92730e14d1bde0e3b
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 13 May 2016 01:20:57 -0400
Delay feed fetching 5 seconds at startup
Would be better not to start until after the initial library's items had
been loaded, but that's a little awkward to do from non-window code.
Might make more sense when there's only Standalone.
Diffstat:
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/feeds.js b/chrome/content/zotero/xpcom/data/feeds.js
@@ -25,6 +25,10 @@
// Mimics Zotero.Libraries
Zotero.Feeds = new function() {
+ this.init = function () {
+ setTimeout(() => this.scheduleNextFeedCheck(), 5000);
+ }
+
this._cache = null;
this._makeCache = function() {
@@ -69,10 +73,6 @@ Zotero.Feeds = new function() {
delete this._cache.libraryIDByURL[url];
}
- this.init = function () {
- return this.scheduleNextFeedCheck();
- }
-
this.importFromOPML = Zotero.Promise.coroutine(function* (opmlString) {
var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"]
.createInstance(Components.interfaces.nsIDOMParser);
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -629,7 +629,6 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
yield Zotero.Creators.init();
yield Zotero.Groups.init();
yield Zotero.Relations.init();
- yield Zotero.Feeds.init();
// Load all library data except for items, which are loaded when libraries are first
// clicked on or if otherwise necessary
@@ -643,8 +642,6 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
);
yield Zotero.QuickCopy.init();
-
- Zotero.Items.startEmptyTrashTimer();
}
catch (e) {
Zotero.logError(e);
@@ -744,6 +741,9 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
throw e;
};
+ Zotero.Items.startEmptyTrashTimer();
+ Zotero.Feeds.init();
+
return true;
}
catch (e) {