From 0d5443d6eed1e1ba8ff248f72e940734d470f689 Mon Sep 17 00:00:00 2001 From: Jimmy Huynh Date: Tue, 26 Jan 2021 15:54:49 +0100 Subject: (+) sharedButton Signed-off-by: Marco Nassabain --- js/app/Run.js | 5 +++-- js/controller/NavigationController.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/app/Run.js b/js/app/Run.js index 1a1572864..2081cd1a3 100644 --- a/js/app/Run.js +++ b/js/app/Run.js @@ -44,11 +44,12 @@ app.run(function ($rootScope, $location, $http, $q, $interval, $route, Loading, case FEED_TYPE.STARRED: url = '/items/starred'; break; - + case FEED_TYPE.SHARED: + url = '/items/shared'; + break; case FEED_TYPE.EXPLORE: url = '/explore'; break; - case FEED_TYPE.UNREAD: url = '/items/unread'; break; diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 4782ff114..4ff3d2b7d 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -114,7 +114,7 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource }; this.isSharedUnread = function () { - return true; + return true; // TODO:: waiting for Nicolas' request to receive the number of shared articles //return this.getSharedCount() > 0; }; @@ -156,6 +156,7 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource }; this.isSharedActive = function () { + console.log("hey i'm : " + $route.current.$$route.type); return $route.current && $route.current.$$route.type === FEED_TYPE.SHARED; }; -- cgit v1.2.3