Update app.js
parent
a9ac37fe17
commit
ae691eda8b
|
|
@ -7,6 +7,13 @@ if (settings.fontIndex==undefined) {
|
||||||
require('Storage').writeJSON("myapp.json", settings);
|
require('Storage').writeJSON("myapp.json", settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function queueDraw() {
|
||||||
|
setTimeout(function() {
|
||||||
|
draw();
|
||||||
|
queueDraw();
|
||||||
|
}, 60000 - (Date.now() % 60000));
|
||||||
|
}
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
// Draw day of the week
|
// Draw day of the week
|
||||||
|
|
@ -24,7 +31,5 @@ Bangle.setUI("clock");
|
||||||
g.clear();
|
g.clear();
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
queueDraw();
|
||||||
draw();
|
draw();
|
||||||
setTimeout(function() {
|
|
||||||
setInterval(draw,60000);
|
|
||||||
}, 60000 - Date.now() % 60000);
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue