mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2026-04-09 00:00:02 +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:
+6
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user