adding agreeDisclaimer flag for compatibility
This commit is contained in:
parent
9aeb1ea4fd
commit
b9557d47d2
7 changed files with 74 additions and 57 deletions
|
|
@ -473,26 +473,30 @@ angular
|
|||
|
||||
storageService.getProfile(function(err, profile) {
|
||||
|
||||
$log.debug('### State: ', $stateParams.status);
|
||||
switch ($stateParams.status) {
|
||||
case 'resume':
|
||||
$rootScope.$emit('Local/Resume');
|
||||
break;
|
||||
case 'backbutton':
|
||||
var shouldExit = $stateParams.isHome == 'true' || !profile.agreeDisclaimer;
|
||||
if (isCordova && shouldExit && !$rootScope.modalOpened) {
|
||||
return navigator.app.exitApp();
|
||||
} else {
|
||||
$rootScope.$emit('closeModal');
|
||||
}
|
||||
break;
|
||||
};
|
||||
//for compatibility
|
||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||
|
||||
if (profile.agreeDisclaimer) {
|
||||
go.walletHome(true);
|
||||
} else {
|
||||
$state.transitionTo('disclaimer');
|
||||
}
|
||||
$log.debug('### State: ', $stateParams.status);
|
||||
switch ($stateParams.status) {
|
||||
case 'resume':
|
||||
$rootScope.$emit('Local/Resume');
|
||||
break;
|
||||
case 'backbutton':
|
||||
var shouldExit = $stateParams.isHome == 'true' || !profile.agreeDisclaimer || !val;
|
||||
if (isCordova && shouldExit && !$rootScope.modalOpened) {
|
||||
return navigator.app.exitApp();
|
||||
} else {
|
||||
$rootScope.$emit('closeModal');
|
||||
}
|
||||
break;
|
||||
};
|
||||
|
||||
if (profile.agreeDisclaimer || val) {
|
||||
go.walletHome(true);
|
||||
} else {
|
||||
$state.transitionTo('disclaimer');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue