disable hardware backbutton (android) and back swipe (ios) and more fixes

This commit is contained in:
Gabriel Bazán 2016-10-10 17:12:14 -03:00
commit 2576b3e790
7 changed files with 36 additions and 40 deletions

View file

@ -2,6 +2,10 @@
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, $ionicModal) {
$scope.walletId = $stateParams.walletId;
$scope.fromState = $stateParams.from;
$scope.toState = $scope.fromState + ".backup";
$scope.openPopup = function() {
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
scope: $scope,
@ -15,24 +19,15 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun
$scope.close = function() {
$scope.warningModal.hide();
$scope.warningModal.remove();
$timeout(function() {
if ($stateParams.from == 'onboarding.backupRequest') {
$state.go('onboarding.backup', {
walletId: $stateParams.walletId
});
} else {
$state.go($stateParams.from + '.backup', {
walletId: $stateParams.walletId
});
}
$state.go($scope.toState, {
walletId: $scope.walletId
});
};
}
$scope.goBack = function() {
$state.go($stateParams.from, {
walletId: $stateParams.walletId
$state.go($scope.fromState, {
walletId: $scope.walletId
});
};