From e7f568d56c7834f0aed0d873d93c93edd126eedc Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Tue, 3 Feb 2015 11:56:27 -0600 Subject: [PATCH] Automatically start feed update when adding new feed --- chrome/content/zotero/zoteroPane.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 1668b3328..388a41b30 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -866,7 +866,7 @@ var ZoteroPane = new function() return collection.saveTx(); }); - this.newFeed = function() { + this.newFeed = Zotero.Promise.coroutine(function() { let data = {}; window.openDialog('chrome://zotero/content/feedSettings.xul', null, 'centerscreen, modal', data); @@ -876,9 +876,10 @@ var ZoteroPane = new function() feed.name = data.title; feed.refreshInterval = data.ttl; feed.cleanupAfter = data.cleanAfter; - feed.save({skipEditCheck: true}); + yield feed.save({skipEditCheck: true}); + Zotero.Feeds.scheduleNextFeedCheck(); } - } + }); this.newGroup = function () { this.loadURI(Zotero.Groups.addGroupURL);