fixing bugs
This commit is contained in:
parent
9cea58584a
commit
dd68836eea
2 changed files with 26 additions and 20 deletions
|
|
@ -475,17 +475,22 @@ angular
|
|||
}
|
||||
})
|
||||
.state('cordova', {
|
||||
url: '/cordova/:status/:exit',
|
||||
url: '/cordova/:status/:exit/:exitApp',
|
||||
views: {
|
||||
'main': {
|
||||
controller: function($rootScope, $state, $stateParams, $timeout, go, isCordova) {
|
||||
|
||||
switch ($stateParams.status) {
|
||||
case 'resume':
|
||||
$rootScope.$emit('Local/Resume');
|
||||
break;
|
||||
case 'backbutton':
|
||||
if (isCordova && $stateParams.exit == 'true' && !$rootScope.modalOpened) {
|
||||
navigator.app.exitApp();
|
||||
if ($stateParams.exitApp == 'true') {
|
||||
navigator.app.exitApp();
|
||||
} else {
|
||||
window.plugins.toast.showShortBottom('Press again to exit');
|
||||
}
|
||||
} else {
|
||||
$rootScope.$emit('closeModal');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue