Skip to content

Commit

Permalink
fix(platform): Fix Platform.showStatusBar so it can be used multiple …
Browse files Browse the repository at this point in the history
…times, closes #702
  • Loading branch information
Adam Bradley committed Mar 1, 2014
1 parent 0c5c675 commit a6c47cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/utils/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

if(this.isAndroid() && version < 4.4) {
this.grade = (version < 4 ? 'c' : 'b');
}
}
}
}
},
Expand Down Expand Up @@ -160,10 +160,10 @@

showStatusBar: function(val) {
// Only useful when run within cordova
this.showStatusBar = val;
this._showStatusBar = val;
this.ready(function(){
// run this only when or if the platform (cordova) is ready
if(ionic.Platform.showStatusBar) {
if(ionic.Platform._showStatusBar) {
// they do not want it to be full screen
StatusBar.show();
document.body.classList.remove('status-bar-hide');
Expand Down Expand Up @@ -203,7 +203,7 @@
// setup listeners to know when the device is ready to go
function onWindowLoad() {
if(ionic.Platform.isCordova()) {
// the window and scripts are fully loaded, and a cordova/phonegap
// the window and scripts are fully loaded, and a cordova/phonegap
// object exists then let's listen for the deviceready
document.addEventListener("deviceready", onPlatformReady, false);
} else {
Expand Down

0 comments on commit a6c47cd

Please sign in to comment.