unsubscribe when wallet is deleted

This commit is contained in:
Gabriel Bazán 2016-01-04 16:35:34 -03:00
commit 2d64e61654
3 changed files with 19 additions and 7 deletions

View file

@ -1273,10 +1273,14 @@ angular.module('copayApp.controllers').controller('indexController', function($r
go.walletHome();
});
$rootScope.$on('Local/EnableNotifications', function(event) {
$rootScope.$on('Local/SubscribeNotifications', function(event) {
pushNotificationsService.enableNotifications();
});
$rootScope.$on('Local/UnsubscribeNotifications', function(event, walletId) {
pushNotificationsService.unsubscribe(walletId);
});
self.debouncedUpdate = lodash.throttle(function() {
self.updateAll({
quiet: true