imgclock: Fix memory/interval leak when LCD turns on
parent
d55be9979f
commit
40f38500b6
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Bangle.on('lcdPower',on=>{
|
|||
if (secondInterval) clearInterval(secondInterval);
|
||||
secondInterval = undefined;
|
||||
if (on) {
|
||||
setInterval(draw,1000);
|
||||
secondInterval = setInterval(draw,1000);
|
||||
draw();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue