From b5340676dc2af36c36e847c33778a917e049e6c0 Mon Sep 17 00:00:00 2001 From: anoy Date: Fri, 24 Apr 2020 16:43:15 +0200 Subject: fixed active menu item and reload for unread Signed-off-by: anoy --- js/controller/NavigationController.js | 5 +++++ templates/part.navigation.unreadfeed.php | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 1c66422d2..7467acffa 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -140,6 +140,11 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource $route.current.$$route.type === FEED_TYPE.SUBSCRIPTIONS; }; + this.isUnreadActive = function () { + return $route.current && + $route.current.$$route.type === FEED_TYPE.UNREAD; + }; + this.isStarredActive = function () { return $route.current && $route.current.$$route.type === FEED_TYPE.STARRED; diff --git a/templates/part.navigation.unreadfeed.php b/templates/part.navigation.unreadfeed.php index 902365c68..ac92625af 100644 --- a/templates/part.navigation.unreadfeed.php +++ b/templates/part.navigation.unreadfeed.php @@ -1,10 +1,10 @@
  • - + t('Unread articles'))?> @@ -40,13 +40,14 @@ active: Navigation.isSubscriptionsActive(), unread: Navigation.isUnread() }" - class="all-subscriptions-feed with-counter with-menu"> + ng-if="Navigation.isShowAll()" + class="all-subscriptions-feed with-menu"> - + t('All articles'))?> -
    +
    -
    +