mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-19 09:22:50 +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 = {
|
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
|
||||||
},
|
},
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user