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
+11 -9
View File
@@ -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;