mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-31 10:35:41 +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
|
||||
exec(null, null, "StatusBar", "_ready", []);
|
||||
|
||||
exec(function (res) {
|
||||
StatusBar.isVisible = res;
|
||||
}, null, "StatusBar", "_ready", []);
|
||||
|
||||
var StatusBar = function () {
|
||||
};
|
||||
@ -89,10 +92,12 @@
|
||||
|
||||
StatusBar.hide = function () {
|
||||
exec(null, null, "StatusBar", "hide", []);
|
||||
StatusBar.isVisible = false;
|
||||
}
|
||||
|
||||
StatusBar.show = function () {
|
||||
exec(null, null, "StatusBar", "show", []);
|
||||
StatusBar.isVisible = true;
|
||||
}
|
||||
|
||||
StatusBar.isVisible = true;
|
||||
|
Loading…
Reference in New Issue
Block a user