imgclock: Fix memory/interval leak when LCD turns on

master
Gordon Williams 2020-05-11 10:34:20 +01:00
parent d55be9979f
commit 40f38500b6
3 changed files with 3 additions and 2 deletions

View File

@ -168,7 +168,7 @@
"name": "Image background clock",
"shortName":"Image Clock",
"icon": "app.png",
"version":"0.04",
"version":"0.05",
"description": "A clock with an image as a background",
"tags": "clock",
"type" : "clock",

View File

@ -3,3 +3,4 @@
0.03: Add {msb:true} so that on new builds, color is correct for 16 bit
0.04: Fix hour alignment for single digits
Scaling for background images <240px wide
0.05: Fix memory/interval leak when LCD turns on

View File

@ -65,7 +65,7 @@ Bangle.on('lcdPower',on=>{
if (secondInterval) clearInterval(secondInterval);
secondInterval = undefined;
if (on) {
setInterval(draw,1000);
secondInterval = setInterval(draw,1000);
draw();
}
});