Update fuzzyw.app.js

master
sir-indy 2022-04-06 12:54:17 +01:00 committed by GitHub
parent eb0d809a61
commit f0fce411b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -62,11 +62,11 @@ draw();
// Stop updates when LCD is off, restart when on // Stop updates when LCD is off, restart when on
Bangle.on('lcdPower',on=>{ Bangle.on('lcdPower',on=>{
if (secondInterval) clearInterval(secondInterval);
secondInterval = undefined;
if (on) { if (on) {
secondInterval = setInterval(draw, 10000); draw(); // draw immediately, queue redraw
draw(); // draw immediately } else { // stop draw timer
if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined;
} }
}); });