From 38ed887e851a5f6052421ef3ea8f8cac2c276b75 Mon Sep 17 00:00:00 2001 From: Hank Date: Tue, 15 Nov 2022 12:10:45 +0100 Subject: [PATCH 1/2] 0.23: Added fast load --- apps/hworldclock/ChangeLog | 1 + apps/hworldclock/app.js | 14 ++++++++++++-- apps/hworldclock/metadata.json | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/hworldclock/ChangeLog b/apps/hworldclock/ChangeLog index a4bd84390..a5b0a079a 100644 --- a/apps/hworldclock/ChangeLog +++ b/apps/hworldclock/ChangeLog @@ -7,3 +7,4 @@ 0.21: Add Settings 0.22: Use default Bangle formatter for booleans 0.23: Added note to configure position in "my location" if not done yet. Small fixes. +0.23: Added fast load diff --git a/apps/hworldclock/app.js b/apps/hworldclock/app.js index a0fb4cd20..74c7067f8 100644 --- a/apps/hworldclock/app.js +++ b/apps/hworldclock/app.js @@ -295,8 +295,18 @@ g.clear(); // Init the settings of the app loadMySettings(); -// Show launcher when button pressed -Bangle.setUI("clock"); +// Show launcher when middle button pressed +Bangle.setUI({ + mode : "clock", + remove : function() { + // Called to unload all of the clock app + if (PosInterval) clearInterval(PosInterval); + PosInterval = undefined; + if (drawTimeoutSeconds) clearTimeout(drawTimeoutSeconds); + drawTimeoutSeconds = undefined; + if (drawTimeout) clearTimeout(drawTimeout); + drawTimeout = undefined; + }}); Bangle.loadWidgets(); Bangle.drawWidgets(); diff --git a/apps/hworldclock/metadata.json b/apps/hworldclock/metadata.json index 653cfc59c..c197d8101 100644 --- a/apps/hworldclock/metadata.json +++ b/apps/hworldclock/metadata.json @@ -2,7 +2,7 @@ "id": "hworldclock", "name": "Hanks World Clock", "shortName": "Hanks World Clock", - "version": "0.23", + "version": "0.24", "description": "Current time zone plus up to three others", "allow_emulator":true, "icon": "app.png", From 99a71e319d00f412522df32006b0e104ddd5c006 Mon Sep 17 00:00:00 2001 From: Hank Date: Tue, 15 Nov 2022 12:14:47 +0100 Subject: [PATCH 2/2] Typo --- apps/hworldclock/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/hworldclock/ChangeLog b/apps/hworldclock/ChangeLog index a5b0a079a..4d8ee5991 100644 --- a/apps/hworldclock/ChangeLog +++ b/apps/hworldclock/ChangeLog @@ -7,4 +7,4 @@ 0.21: Add Settings 0.22: Use default Bangle formatter for booleans 0.23: Added note to configure position in "my location" if not done yet. Small fixes. -0.23: Added fast load +0.24: Added fast load