Skip to content

Commit

Permalink
remove old status bar hiding code
Browse files Browse the repository at this point in the history
  • Loading branch information
msalcala11 committed Nov 16, 2016
1 parent 1f91ba9 commit 46a0303
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 39 deletions.
11 changes: 0 additions & 11 deletions src/js/controllers/feedback/complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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({
Expand Down
14 changes: 0 additions & 14 deletions src/js/controllers/feedback/rateApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 3 additions & 14 deletions src/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,17 +750,11 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
templateUrl: 'views/feedback/send.html',
controller: 'sendController'
}
},
customConfig: {
hideStatusBar: true
}
})
.state('tabs.rate', {
url: '/rate',
abstract: true,
customConfig: {
hideStatusBar: true
}
abstract: true
})
.state('tabs.rate.send', {
url: '/send/:score',
Expand All @@ -769,9 +763,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
templateUrl: 'views/feedback/send.html',
controller: 'sendController'
}
},
customConfig: {
hideStatusBar: true
}
})
.state('tabs.rate.complete', {
Expand Down Expand Up @@ -1107,16 +1098,14 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
$log.debug('Route change from:', fromState.name || '-', ' to:', toState.name);
$log.debug(' toParams:' + JSON.stringify(toParams || {}));
$log.debug(' fromParams:' + JSON.stringify(fromParams || {}));
});

console.log('toState', toState);

$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
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();
}
Expand Down

0 comments on commit 46a0303

Please sign in to comment.