prelim status bar show/hide logic based on ui-router events

This commit is contained in:
Marty Alcala 2016-11-16 11:24:25 -05:00
parent af018f0a18
commit fe5bdc1920
1 changed files with 17 additions and 0 deletions

View File

@ -157,6 +157,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
controller: 'walletDetailsController', controller: 'walletDetailsController',
templateUrl: 'views/walletDetails.html' templateUrl: 'views/walletDetails.html'
} }
},
customConfig: {
hideStatusBar: true
} }
}) })
.state('tabs.activity', { .state('tabs.activity', {
@ -1092,5 +1095,19 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
$log.debug('Route change from:', fromState.name || '-', ' to:', toState.name); $log.debug('Route change from:', fromState.name || '-', ' to:', toState.name);
$log.debug(' toParams:' + JSON.stringify(toParams || {})); $log.debug(' toParams:' + JSON.stringify(toParams || {}));
$log.debug(' fromParams:' + JSON.stringify(fromParams || {})); $log.debug(' fromParams:' + JSON.stringify(fromParams || {}));
console.log('toState', toState);
if(toState.customConfig && toState.customConfig.hideStatusBar) {
console.log('hiding status bar');
if($window.StatusBar) {
$window.StatusBar.hide();
}
} else {
console.log('showing status bar');
if($window.StatusBar) {
$window.StatusBar.show();
}
}
}); });
}); });