diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2019-02-24 11:40:29 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2019-03-05 11:35:14 +0100 |
commit | 6a4e56e7274d85bcbd0e2dcde7a61d8f7a4397ec (patch) | |
tree | 5bafad374708f5542081592456869f6fa1226f86 /js/controller/NavigationController.js | |
parent | 45474dc86232897199382327527c7de80ec99c1c (diff) |
Cleanup JS and prolong error notification
Diffstat (limited to 'js/controller/NavigationController.js')
-rw-r--r-- | js/controller/NavigationController.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 812c2b2bd..e79202574 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -7,9 +7,8 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -app.controller('NavigationController', -function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, - SettingsResource, Publisher, $rootScope, $location, $q) { +app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, + SettingsResource, Publisher, $rootScope, $location, $q) { 'use strict'; this.feedError = ''; @@ -84,7 +83,7 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, return this.getFeedUnreadCount(feedId) > 0; }; - this.getFolderUnreadCount= function (folderId) { + this.getFolderUnreadCount = function (folderId) { return FeedResource.getFolderUnreadCount(folderId); }; @@ -175,15 +174,11 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, // is closed or has no unread articles existingFolder.getsFeed = true; - FeedResource.create(feed.url, existingFolder.id, undefined, - feed.user, feed.password) - .then(function (data) { - + FeedResource.create(feed.url, existingFolder.id, undefined, feed.user, feed.password).then(function (data) { Publisher.publishAll(data); // set folder as default $location.path('/items/feeds/' + data.feeds[0].id + '/'); - }).finally(function () { existingFolder.getsFeed = undefined; feed.url = ''; |