mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #490 from gabrielbazan7/fix/modalTimeout
add timeout to backup needed modal
This commit is contained in:
commit
f34409c093
|
@ -131,6 +131,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
}
|
}
|
||||||
|
|
||||||
profileService.setBackupFlag(wallet.credentials.walletId);
|
profileService.setBackupFlag(wallet.credentials.walletId);
|
||||||
|
profileService.setBackupNeededModalFlag(wallet.credentials.walletId);
|
||||||
return cb();
|
return cb();
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
|
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
$scope.isNW = platformInfo.isNW;
|
$scope.isNW = platformInfo.isNW;
|
||||||
|
var showModalTimeout;
|
||||||
|
|
||||||
$scope.shareAddress = function(addr) {
|
$scope.shareAddress = function(addr) {
|
||||||
if ($scope.generatingAddress) return;
|
if ($scope.generatingAddress) return;
|
||||||
|
@ -14,19 +14,21 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setAddress = function(forceNew) {
|
$scope.setAddress = function(forceNew) {
|
||||||
if ($scope.generatingAddress || !$scope.wallet.isComplete()) return;
|
if (!$scope.wallet || $scope.generatingAddress || !$scope.wallet.isComplete()) return;
|
||||||
|
|
||||||
$scope.addr = null;
|
$scope.addr = null;
|
||||||
$scope.generatingAddress = true;
|
$scope.generatingAddress = true;
|
||||||
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
||||||
$scope.generatingAddress = false;
|
$scope.generatingAddress = false;
|
||||||
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||||
$scope.addr = addr;
|
$scope.addr = addr;
|
||||||
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
|
if ($scope.wallet.showBackupNeededModal) {
|
||||||
|
showModalTimeout = $timeout(function() {
|
||||||
$timeout(function(){
|
$scope.openBackupNeededModal();
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
$timeout(function() {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
},10);
|
}, 10);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,6 +90,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.$on("$ionicView.leave", function(event, data) {
|
||||||
|
$timeout.cancel(showModalTimeout);
|
||||||
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
$scope.wallets = profileService.getWallets();
|
$scope.wallets = profileService.getWallets();
|
||||||
$scope.wallet = $scope.wallets[0];
|
$scope.wallet = $scope.wallets[0];
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<a ui-sref="tabs.add" ng-if="wallets[0]"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
|
<a ui-sref="tabs.add" ng-if="wallets[0]"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a ng-if="!wallets[0]" ui-sref="tabs.add" class="item item-icon-left item-big-icon-left item-icon-right next-step ng-hide">
|
<a ng-if="!wallets[0]" ui-sref="tabs.add" class="item item-icon-left item-big-icon-left item-icon-right next-step">
|
||||||
<i class="icon big-icon-svg">
|
<i class="icon big-icon-svg">
|
||||||
<div class="bg icon-create-wallet"></div>
|
<div class="bg icon-create-wallet"></div>
|
||||||
</i>
|
</i>
|
||||||
|
|
Loading…
Reference in New Issue