mirror of https://github.com/BTCPrivate/copay.git
reactivate swipeback when leaving a view where swipeback is not enabled
This commit is contained in:
parent
9187c72fb9
commit
91b62bb884
|
@ -7,10 +7,15 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
var countDown = null;
|
||||
var cachedSendMax = {};
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function(event, data) {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
|
||||
toAmount = data.stateParams.toAmount;
|
||||
cachedSendMax = {};
|
||||
$scope.showFeeFiat = false;
|
||||
|
|
|
@ -46,6 +46,10 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
|
||||
$scope.skipped = (data.stateParams && data.stateParams.skipped) ? true : false;
|
||||
|
|
|
@ -41,6 +41,10 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
if (goHome) $state.go('tabs.home');
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function(event, data) {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
|
||||
|
|
|
@ -2,9 +2,16 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $stateParams, $ionicConfig, popupService, gettextCatalog) {
|
||||
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
$scope.walletId = $stateParams.walletId;
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function(event, data) {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
});
|
||||
|
||||
$scope.openPopup = function() {
|
||||
|
||||
var title = gettextCatalog.getString('Watch out!');
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService, walletService, platformInfo) {
|
||||
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
$scope.$on("$ionicView.beforeLeave", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
});
|
||||
|
||||
var isCordova = platformInfo.isCordova;
|
||||
var isWP = platformInfo.isWP;
|
||||
var usePushNotifications = isCordova && !isWP;
|
||||
|
@ -34,8 +41,7 @@ angular.module('copayApp.controllers').controller('collectEmailController', func
|
|||
$state.go('onboarding.backupRequest', {
|
||||
walletId: walletId
|
||||
});
|
||||
}
|
||||
else if (requiresOptIn) {
|
||||
} else if (requiresOptIn) {
|
||||
$state.go('onboarding.notifications', {
|
||||
walletId: walletId
|
||||
});
|
||||
|
|
|
@ -12,10 +12,15 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi
|
|||
$scope.accepted = {};
|
||||
$scope.accepted.first = $scope.accepted.second = $scope.accepted.third = false;
|
||||
$scope.backedUp = $stateParams.backedUp;
|
||||
$scope.resume = $stateParams.resume;
|
||||
$scope.resume = $stateParams.resume || false;
|
||||
if ($scope.backedUp || $scope.resume) $ionicConfig.views.swipeBackEnabled(false);
|
||||
$scope.shrinkView = false;
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.confirm = function() {
|
||||
profileService.setDisclaimerAccepted(function(err) {
|
||||
if (err) $log.error(err);
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $timeout, $stateParams, $ionicConfig, profileService, configService, $interval) {
|
||||
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
$scope.$on("$ionicView.beforeEnter", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.walletId = $stateParams.walletId;
|
||||
|
||||
$scope.allowNotif = function() {
|
||||
|
|
|
@ -2,12 +2,18 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService, storageService) {
|
||||
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
|
||||
$scope.$parent.$on("$ionicView.afterEnter", function() {
|
||||
startupService.ready();
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeLeave", function() {
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
});
|
||||
|
||||
$scope.createProfile = function() {
|
||||
$log.debug('Creating profile');
|
||||
profileService.createProfile(function(err) {
|
||||
|
|
Loading…
Reference in New Issue