Fix for chromeapp and mobile with a simple timeout

This commit is contained in:
Gustavo Maximiliano Cortez 2015-10-22 19:06:23 -03:00
parent 6dd8b98dfc
commit 5c42f54e96
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
1 changed files with 22 additions and 16 deletions

View File

@ -180,26 +180,32 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.add = function(addressbook) {
$scope.error = null;
addressbookService.add(addressbook, function(err, ab) {
if (err) {
$scope.error = err;
return;
}
$scope.list = ab;
$scope.editAddressbook = true;
$scope.toggleEditAddressbook();
});
$timeout(function() {
addressbookService.add(addressbook, function(err, ab) {
if (err) {
$scope.error = err;
return;
}
$scope.list = ab;
$scope.editAddressbook = true;
$scope.toggleEditAddressbook();
$scope.$digest();
});
}, 100);
};
$scope.remove = function(addr) {
$scope.error = null;
addressbookService.remove(addr, function(err, ab) {
if (err) {
$scope.error = err;
return;
}
$scope.list = ab;
});
$timeout(function() {
addressbookService.remove(addr, function(err, ab) {
if (err) {
$scope.error = err;
return;
}
$scope.list = ab;
$scope.$digest();
});
}, 100);
};
$scope.cancel = function() {