We don't allow setting notifications to unread anymore so also prevent state issues when decreasing the counter
This commit is contained in:
@@ -71,8 +71,9 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
|
||||
}
|
||||
|
||||
// update state of acknowledged notification
|
||||
$scope.notificationAcknowledged = function (ack) {
|
||||
$scope.notificationCount += (ack ? -1 : +1);
|
||||
$scope.notificationAcknowledged = function () {
|
||||
if ($scope.notificationCount === 0) return; // already down to 0
|
||||
$scope.notificationCount--;
|
||||
};
|
||||
|
||||
function init() {
|
||||
|
||||
Reference in New Issue
Block a user