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.
This commit is contained in:
Dan Stillman 2016-05-13 01:20:57 -04:00
parent 5a54466099
commit 55c60a69ac
2 changed files with 7 additions and 7 deletions

View file

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

View file

@ -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) {