add timeout to backup needed modal
This commit is contained in:
parent
65dc3d24c0
commit
138885cc82
3 changed files with 15 additions and 8 deletions
|
|
@ -131,6 +131,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
}
|
||||
|
||||
profileService.setBackupFlag(wallet.credentials.walletId);
|
||||
profileService.setBackupNeededModalFlag(wallet.credentials.walletId);
|
||||
return cb();
|
||||
}, 1);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.isNW = platformInfo.isNW;
|
||||
|
||||
var showModalTimeout;
|
||||
|
||||
$scope.shareAddress = function(addr) {
|
||||
if ($scope.generatingAddress) return;
|
||||
|
|
@ -14,19 +14,21 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
};
|
||||
|
||||
$scope.setAddress = function(forceNew) {
|
||||
if ($scope.generatingAddress || !$scope.wallet.isComplete()) return;
|
||||
|
||||
if (!$scope.wallet || $scope.generatingAddress || !$scope.wallet.isComplete()) return;
|
||||
$scope.addr = null;
|
||||
$scope.generatingAddress = true;
|
||||
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
||||
$scope.generatingAddress = false;
|
||||
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
$scope.addr = addr;
|
||||
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
|
||||
|
||||
$timeout(function(){
|
||||
if ($scope.wallet.showBackupNeededModal) {
|
||||
showModalTimeout = $timeout(function() {
|
||||
$scope.openBackupNeededModal();
|
||||
}, 2000);
|
||||
}
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
},10);
|
||||
}, 10);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -88,6 +90,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
}, 100);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.leave", function(event, data) {
|
||||
$timeout.cancel(showModalTimeout);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.wallets = profileService.getWallets();
|
||||
$scope.wallet = $scope.wallets[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue