summaryrefslogtreecommitdiffstats
path: root/js/controller
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-09-06 15:42:51 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-09-06 15:42:51 +0200
commit70ff47a9b77797e75137ba02f0b7df9bc2745f56 (patch)
treeaef60c640494dc3996ae565ce6f4b74cc2dee572 /js/controller
parent5323fa1fb1bd43ef653a91f5bba6d63cd18078f3 (diff)
fix # 848
Diffstat (limited to 'js/controller')
-rw-r--r--js/controller/NavigationController.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js
index 00c5b9699..259b9ff7d 100644
--- a/js/controller/NavigationController.js
+++ b/js/controller/NavigationController.js
@@ -302,6 +302,13 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource,
$route.reload();
};
+ this.togglePinned = function (feedId) {
+ var feed = FeedResource.getById(feedId);
+ if (feed) {
+ return FeedResource.setPinned(feedId, !feed.pinned);
+ }
+ };
+
this.toggleFullText = function (feed) {
$rootScope.$broadcast('$routeChangeStart');
FeedResource.toggleFullText(feed.id).finally(function () {