Updates addressbook variable only if it is modified

This commit is contained in:
Gustavo Maximiliano Cortez 2015-11-02 11:51:46 -03:00
parent 46812b7eef
commit c7f09f5e86
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
1 changed files with 2 additions and 1 deletions

View File

@ -214,6 +214,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.error = err;
return;
}
$rootScope.$emit('Local/AddressbookUpdated');
$scope.list = ab;
$scope.editAddressbook = true;
$scope.toggleEditAddressbook();
@ -230,6 +231,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.error = err;
return;
}
$rootScope.$emit('Local/AddressbookUpdated');
$scope.list = ab;
$scope.$digest();
});
@ -272,7 +274,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
modalInstance.result.finally(function() {
$rootScope.modalOpened = false;
$rootScope.$emit('Local/AddressbookUpdated');
disableCloseModal();
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass(animationService.modalAnimated.slideOutDown);