diff --git a/src/js/main.js b/src/js/main.js index c0a43937c..63dbc24fc 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -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'); - }); - }); }