diff --git a/src/js/main.js b/src/js/main.js index 23f7eaeca..20f4da0d0 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -73,8 +73,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route', // update state of acknowledged notification $scope.notificationAcknowledged = function () { - if ($scope.notificationCount === 0) return; // already down to 0 - $scope.notificationCount--; + refreshNotifications(); }; function init() { diff --git a/src/views/notifications.js b/src/views/notifications.js index 93066be19..03445bb76 100644 --- a/src/views/notifications.js +++ b/src/views/notifications.js @@ -70,7 +70,6 @@ angular.module('Application').controller('NotificationsController', ['$scope', ' console.error(error); } else { notification.acknowledged = true; - $scope.$parent.notificationAcknowledged(); } callback(); @@ -78,6 +77,9 @@ angular.module('Application').controller('NotificationsController', ['$scope', ' }, function (error) { if (error) console.error(error); + // refresh the main navbar indicator + $scope.$parent.notificationAcknowledged(); + $scope.hasUnread = false; $scope.clearAllBusy = false; });