Fix UI for dismissing notifications

Fixes #959
This commit is contained in:
Joseph Schorr 2015-12-22 07:38:57 -05:00
parent 5ac7369bf5
commit 9cb1366d36
3 changed files with 11 additions and 7 deletions

View file

@ -140,14 +140,14 @@ function($rootScope, $interval, UserService, ApiService, StringBuilderService, P
'uuid': notification.id
};
ApiService.updateUserNotification(notification, params, function() {
ApiService.updateUserNotification(notification, params).then(function(resp) {
var index = $.inArray(notification, notificationService.notifications);
if (index >= 0) {
notificationService.notifications.splice(index, 1);
}
notificationService.update();
}, ApiService.errorDisplay('Could not update notification'));
var index = $.inArray(notification, notificationService.notifications);
if (index >= 0) {
notificationService.notifications.splice(index, 1);
}
};
notificationService.getActions = function(notification) {