mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-19 01:12:49 +08:00
CB-10683 Fix wrong StatusBar.isVisible initial value on Windows
This commit is contained in:
parent
8a3f9edb9d
commit
bf7869cec7
@ -55,9 +55,11 @@ function hexToRgb(hex) {
|
||||
|
||||
module.exports = {
|
||||
_ready: function(win, fail) {
|
||||
win(statusBar.occludedRect.height !== 0);
|
||||
if(isSupported()) {
|
||||
var statusBar = getViewStatusBar();
|
||||
win(statusBar.occludedRect.height !== 0);
|
||||
}
|
||||
},
|
||||
|
||||
overlaysWebView: function () {
|
||||
// not supported
|
||||
},
|
||||
|
@ -97,15 +97,17 @@ var StatusBar = {
|
||||
|
||||
};
|
||||
|
||||
// prime it
|
||||
exec(function (res) {
|
||||
if (typeof res == 'object') {
|
||||
if (res.type == 'tap') {
|
||||
cordova.fireWindowEvent('statusTap');
|
||||
// prime it. setTimeout so that proxy gets time to init
|
||||
window.setTimeout(function () {
|
||||
exec(function (res) {
|
||||
if (typeof res == 'object') {
|
||||
if (res.type == 'tap') {
|
||||
cordova.fireWindowEvent('statusTap');
|
||||
}
|
||||
} else {
|
||||
StatusBar.isVisible = res;
|
||||
}
|
||||
} else {
|
||||
StatusBar.isVisible = res;
|
||||
}
|
||||
}, null, "StatusBar", "_ready", []);
|
||||
}, null, "StatusBar", "_ready", []);
|
||||
}, 0);
|
||||
|
||||
module.exports = StatusBar;
|
||||
|
Loading…
Reference in New Issue
Block a user