mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-04-22 22:06:22 +08:00
Store updated value of isVisible when we call show/hide. Use callback to set initial isVisible value for _ready
This commit is contained in:
parent
d7498d31ed
commit
20da4198f9
@ -41,7 +41,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// prime it
|
// prime it
|
||||||
exec(null, null, "StatusBar", "_ready", []);
|
|
||||||
|
exec(function (res) {
|
||||||
|
StatusBar.isVisible = res;
|
||||||
|
}, null, "StatusBar", "_ready", []);
|
||||||
|
|
||||||
var StatusBar = function () {
|
var StatusBar = function () {
|
||||||
};
|
};
|
||||||
@ -89,10 +92,12 @@
|
|||||||
|
|
||||||
StatusBar.hide = function () {
|
StatusBar.hide = function () {
|
||||||
exec(null, null, "StatusBar", "hide", []);
|
exec(null, null, "StatusBar", "hide", []);
|
||||||
|
StatusBar.isVisible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBar.show = function () {
|
StatusBar.show = function () {
|
||||||
exec(null, null, "StatusBar", "show", []);
|
exec(null, null, "StatusBar", "show", []);
|
||||||
|
StatusBar.isVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBar.isVisible = true;
|
StatusBar.isVisible = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user