CB-10683 Fix wrong StatusBar.isVisible initial value on Windows

This commit is contained in:
daserge 2016-02-24 10:32:46 +03:00
parent 8a3f9edb9d
commit bf7869cec7
2 changed files with 15 additions and 11 deletions

View File

@ -55,9 +55,11 @@ function hexToRgb(hex) {
module.exports = { module.exports = {
_ready: function(win, fail) { _ready: function(win, fail) {
win(statusBar.occludedRect.height !== 0); if(isSupported()) {
var statusBar = getViewStatusBar();
win(statusBar.occludedRect.height !== 0);
}
}, },
overlaysWebView: function () { overlaysWebView: function () {
// not supported // not supported
}, },

View File

@ -97,15 +97,17 @@ var StatusBar = {
}; };
// prime it // prime it. setTimeout so that proxy gets time to init
exec(function (res) { window.setTimeout(function () {
if (typeof res == 'object') { exec(function (res) {
if (res.type == 'tap') { if (typeof res == 'object') {
cordova.fireWindowEvent('statusTap'); if (res.type == 'tap') {
cordova.fireWindowEvent('statusTap');
}
} else {
StatusBar.isVisible = res;
} }
} else { }, null, "StatusBar", "_ready", []);
StatusBar.isVisible = res; }, 0);
}
}, null, "StatusBar", "_ready", []);
module.exports = StatusBar; module.exports = StatusBar;