mirror of https://github.com/BTCPrivate/copay.git
fix prevent click
This commit is contained in:
parent
d13379e2d1
commit
2d8663171c
|
@ -24,7 +24,7 @@
|
|||
<div class="m20b" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
|
||||
</div>
|
||||
<ul class="no-bullet m0">
|
||||
<li ng-click="isDeletingWallet || preferences.deleteWallet()">
|
||||
<li ng-click="preferences.deleteWallet()">
|
||||
<div class="right" ng-style="{'color':index.backgroundColor}" ng-show="!isDeletingWallet">
|
||||
{{index.walletName}} <span ng-show="index.alias">({{index.alias}})</span>
|
||||
</div>
|
||||
|
|
|
@ -39,15 +39,13 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
|
||||
modalInstance.result.then(function(ok) {
|
||||
if (ok) {
|
||||
$timeout(function() {
|
||||
$scope.isDeletingWallet = true;
|
||||
_deleteWallet();
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var _deleteWallet = function() {
|
||||
$scope.isDeletingWallet = true;
|
||||
var fc = profileService.focusedClient;
|
||||
var name = fc.credentials.walletName;
|
||||
var walletName = (fc.alias || '') + ' [' + name + ']';
|
||||
|
@ -67,15 +65,13 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
};
|
||||
|
||||
this.deleteWallet = function() {
|
||||
if ($scope.isDeletingWallet) return;
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
delete_msg,
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 1) {
|
||||
$timeout(function() {
|
||||
$scope.isDeletingWallet = true;
|
||||
_deleteWallet();
|
||||
}, 100);
|
||||
}
|
||||
},
|
||||
confirm_msg, [accept_msg, cancel_msg]
|
||||
|
|
Loading…
Reference in New Issue