Do not show notification bubbles for notification items

This commit is contained in:
Johannes Zellner
2019-01-17 13:26:17 +01:00
parent 14560fff0a
commit 59c8211c41

View File

@@ -73,21 +73,10 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
function refreshNotifications() {
Client.getNotifications(false, 1, 20, function (error, results) {
if (error) console.error(error);
else $scope.notifications = results;
$timeout(refreshNotifications, 10000);
if (error) return console.error(error);
var newNotifications = results.filter(function (a) {
return !$scope.notifications.find(function (b) {
return a.id === b.id;
});
});
newNotifications.forEach(function (n) {
$scope.notifications.push(n);
Client.notify(n.title, n.message, false, 'info', '/#/notifications');
});
});
}