forked from FOSS/BangleApps
hide widget bar
parent
993873c9a7
commit
77f82b7c1e
|
@ -7,6 +7,8 @@ exports.input = function(options) {
|
||||||
let chartX = 0;
|
let chartX = 0;
|
||||||
let chartY = 0;
|
let chartY = 0;
|
||||||
|
|
||||||
|
let shouldShowWidgetBar = Bangle.appRect.y > 0;
|
||||||
|
|
||||||
options = options||{};
|
options = options||{};
|
||||||
let text = options.text;
|
let text = options.text;
|
||||||
if ('string' != typeof text) text='';
|
if ('string' != typeof text) text='';
|
||||||
|
@ -216,6 +218,7 @@ exports.input = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Draw initial string
|
// Draw initial string
|
||||||
|
require("widget_utils").hide();
|
||||||
g.setBgColor(g.theme.bg);
|
g.setBgColor(g.theme.bg);
|
||||||
draw();
|
draw();
|
||||||
|
|
||||||
|
@ -237,6 +240,9 @@ exports.input = function(options) {
|
||||||
draw();
|
draw();
|
||||||
} else {
|
} else {
|
||||||
// Exit and return text on button
|
// Exit and return text on button
|
||||||
|
if (shouldShowWidgetBar) {
|
||||||
|
require("widget_utils").show();
|
||||||
|
}
|
||||||
Bangle.setUI();
|
Bangle.setUI();
|
||||||
g.clearRect(Bangle.appRect);
|
g.clearRect(Bangle.appRect);
|
||||||
resolve(text);
|
resolve(text);
|
||||||
|
|
Loading…
Reference in New Issue