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 // Remove handler to allow fast loading
Bangle.setUI({mode:"clock", remove:function() { Bangle.setUI({mode:"clock", remove:function() {
if (drawTimeout) clearTimeout(drawTimeout); if (drawTimeout) clearTimeout(drawTimeout);
require("widget_utils").show();
}}); }});
// Load and display widgets // Load and display widgets
Bangle.loadWidgets();
if (settings.showWidgets) { if (settings.showWidgets) {
Bangle.loadWidgets(); require("widget_utils").show();
Bangle.drawWidgets(); } else {
require("widget_utils").hide();
} }
// draw initial boxes and queue subsequent redraws // draw initial boxes and queue subsequent redraws