fix backbutton in disclaimer page

This commit is contained in:
Gabriel Bazán 2015-12-10 15:55:08 -03:00
commit 9e2ea24544
2 changed files with 11 additions and 8 deletions

View file

@ -475,7 +475,7 @@ angular
}
})
.state('cordova', {
url: '/cordova/:status/:exit/:secondBackButtonPress',
url: '/cordova/:status/:fromHome/:fromDisclaimer/:secondBackButtonPress',
views: {
'main': {
controller: function($rootScope, $state, $stateParams, $timeout, go, isCordova) {
@ -485,7 +485,11 @@ angular
$rootScope.$emit('Local/Resume');
break;
case 'backbutton':
if (isCordova && $stateParams.exit == 'true' && !$rootScope.modalOpened) {
if ($stateParams.fromDisclaimer == 'true')
navigator.app.exitApp();
if (isCordova && $stateParams.fromHome == 'true' && !$rootScope.modalOpened) {
if ($stateParams.secondBackButtonPress == 'true') {
navigator.app.exitApp();
} else {