beebclock 0.05: Avoid 'loadWidgets' at LCD on, which will cause memory leak

pull/797/head
Gordon Williams 2021-09-01 08:41:31 +01:00
parent 9f524462bf
commit 11b7000259
3 changed files with 3 additions and 3 deletions

View File

@ -2039,7 +2039,7 @@
"id": "beebclock", "id": "beebclock",
"name": "Beeb Clock", "name": "Beeb Clock",
"icon": "beebclock.png", "icon": "beebclock.png",
"version":"0.04", "version":"0.05",
"description": "Clock face that may be coincidentally familiar to BBC viewers", "description": "Clock face that may be coincidentally familiar to BBC viewers",
"tags": "clock", "tags": "clock",
"type": "clock", "type": "clock",

View File

@ -2,3 +2,4 @@
0.02: Fixes; widget support 0.02: Fixes; widget support
0.03: Remove hardcoded hour buzz (you can install widchime if you miss it) 0.03: Remove hardcoded hour buzz (you can install widchime if you miss it)
0.04: Update to use Bangle.setUI instead of setWatch 0.04: Update to use Bangle.setUI instead of setWatch
0.05: Avoid 'loadWidgets' at LCD on, which will cause memory leak

View File

@ -356,6 +356,7 @@ const changeSeconds = () => {
}; };
Bangle.loadWidgets(); Bangle.loadWidgets();
// widgets are drawn in drawAll()
// Restore mode // Restore mode
try { try {
@ -373,8 +374,6 @@ drawAll();
Bangle.on('lcdPower', (on) => { Bangle.on('lcdPower', (on) => {
if (on) { if (on) {
Bangle.loadWidgets();
Bangle.drawWidgets();
drawAll(); drawAll();
} else { } else {
clearTimeout(); clearTimeout();