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) {
if(isSupported()) {
var statusBar = getViewStatusBar();
win(statusBar.occludedRect.height !== 0); win(statusBar.occludedRect.height !== 0);
}
}, },
overlaysWebView: function () { overlaysWebView: function () {
// not supported // not supported
}, },

View File

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