Correctly handle hiding/showing widgets

pull/3519/head
Ian Ward 2024-07-21 19:05:12 +01:00
parent 2b6839bedb
commit ec9bc29295
1 changed files with 5 additions and 2 deletions

View File

@ -125,12 +125,15 @@
// Remove handler to allow fast loading
Bangle.setUI({mode:"clock", remove:function() {
if (drawTimeout) clearTimeout(drawTimeout);
require("widget_utils").show();
}});
// Load and display widgets
if (settings.showWidgets) {
Bangle.loadWidgets();
Bangle.drawWidgets();
if (settings.showWidgets) {
require("widget_utils").show();
} else {
require("widget_utils").hide();
}
// draw initial boxes and queue subsequent redraws