diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-20 17:16:27 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-20 17:16:27 +0100 |
commit | 1246c296cb432af47ecb1baacb8faa3c93fc9118 (patch) | |
tree | a30778a868765a52a3f419ef64ffbcd1f5dd8ba9 /js/controller | |
parent | 5cc1be3a0183c52064a087e2f9514422982a28a1 (diff) |
hide suggestions from explore if they are already in your feed list
Diffstat (limited to 'js/controller')
-rw-r--r-- | js/controller/ExploreController.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/controller/ExploreController.js b/js/controller/ExploreController.js index 9de6035e7..d7f869eaf 100644 --- a/js/controller/ExploreController.js +++ b/js/controller/ExploreController.js @@ -7,11 +7,15 @@ * @author Bernhard Posselt <dev@bernhard-posselt.com> * @copyright Bernhard Posselt 2014 */ -app.controller('ExploreController', function (sites, $rootScope) { +app.controller('ExploreController', function (sites, $rootScope, FeedResource) { 'use strict'; this.sites = sites; + this.feedExists = function (url) { + return FeedResource.get(url) !== undefined; + }; + this.subscribeTo = function (url) { $rootScope.$broadcast('addFeed', url); }; |