Updates addressbook variable only if it is modified

This commit is contained in:
Gustavo Maximiliano Cortez 2015-11-02 11:51:46 -03:00
commit c7f09f5e86
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF

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);