Skip to content

Commit edd7ea2

Browse files
gfwilliamssquirrelbob
authored andcommitted
Fix widget_utils breakage which caused the widget bar used with swipeOn to literally never be hidden. Was
introduced as part of espruino#3417 (comment)
1 parent 83c5ccc commit edd7ea2

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

modules/widget_utils.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,17 @@ exports.swipeOn = function(autohide) {
9090

9191
function queueDraw() {
9292
const o = exports.offset;
93+
Bangle.appRect.y = o+24;
94+
Bangle.appRect.h = 1 + Bangle.appRect.y2 - Bangle.appRect.y;
9395
if (o>-24) {
94-
Bangle.appRect.y = o+24;
95-
Bangle.appRect.h = 1 + Bangle.appRect.y2 - Bangle.appRect.y;
96-
if (o>-24) {
97-
Bangle.setLCDOverlay(og, 0, o, {
98-
id:"widget_utils",
99-
remove:()=>{
100-
require("widget_utils").cleanupOverlay();
101-
}
102-
});
103-
} else {
104-
Bangle.setLCDOverlay(undefined, {id: "widget_utils"});
105-
}
96+
Bangle.setLCDOverlay(og, 0, o, {
97+
id:"widget_utils",
98+
remove:()=>{
99+
require("widget_utils").cleanupOverlay();
100+
}
101+
});
102+
} else {
103+
Bangle.setLCDOverlay(undefined, {id: "widget_utils"});
106104
}
107105
}
108106

0 commit comments

Comments
 (0)