Merge pull request #5059 from msalcala11/statusBarRouting
Status bar routing
This commit is contained in:
commit
e514698ba6
3 changed files with 16 additions and 25 deletions
|
|
@ -31,10 +31,6 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
if (window.StatusBar) {
|
||||
$log.debug('Hiding status bar...');
|
||||
StatusBar.hide();
|
||||
}
|
||||
|
||||
storageService.getFeedbackInfo(function(error, info) {
|
||||
var feedbackInfo = lodash.isString(info) ? JSON.parse(info) : null;
|
||||
|
|
@ -95,13 +91,6 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
}, 100);
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.afterLeave", function() {
|
||||
if (window.StatusBar) {
|
||||
$log.debug('Showing status bar...');
|
||||
StatusBar.show();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.close = function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.nextViewOptions({
|
||||
|
|
|
|||
|
|
@ -29,20 +29,6 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function() {
|
||||
if(window.StatusBar){
|
||||
$log.debug('Hiding status bar...');
|
||||
StatusBar.hide();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.afterLeave", function() {
|
||||
if(window.StatusBar){
|
||||
$log.debug('Showing status bar...');
|
||||
StatusBar.show();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.sendFeedback = function() {
|
||||
$state.go('tabs.rate.send', {
|
||||
score: $scope.score
|
||||
|
|
|
|||
|
|
@ -772,6 +772,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
controller: 'completeController',
|
||||
templateUrl: 'views/feedback/complete.html'
|
||||
}
|
||||
},
|
||||
customConfig: {
|
||||
hideStatusBar: true
|
||||
}
|
||||
})
|
||||
.state('tabs.rate.rateApp', {
|
||||
|
|
@ -781,6 +784,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
controller: 'rateAppController',
|
||||
templateUrl: 'views/feedback/rateApp.html'
|
||||
}
|
||||
},
|
||||
customConfig: {
|
||||
hideStatusBar: true
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -1093,4 +1099,14 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
$log.debug(' toParams:' + JSON.stringify(toParams || {}));
|
||||
$log.debug(' fromParams:' + JSON.stringify(fromParams || {}));
|
||||
});
|
||||
|
||||
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
|
||||
if($window.StatusBar) {
|
||||
if(toState.customConfig && toState.customConfig.hideStatusBar) {
|
||||
$window.StatusBar.hide();
|
||||
} else {
|
||||
$window.StatusBar.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue