mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(platform): Fix Platform.showStatusBar so it can be used multiple times, closes #702
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
|
||||
if(this.isAndroid() && version < 4.4) {
|
||||
this.grade = (version < 4 ? 'c' : 'b');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -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');
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user