Update app.js

added clockbackground app functionality
master
only-meeps 2024-07-09 14:09:44 -07:00 committed by GitHub
parent 8f4ea698e2
commit 47854f6950
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 5 deletions

View File

@ -4,7 +4,7 @@
* 1. Module dependencies and initial configurations * 1. Module dependencies and initial configurations
* --------------------------------------------------------------- * ---------------------------------------------------------------
*/ */
let background = require("clockbg");
let storage = require("Storage"); let storage = require("Storage");
let locale = require("locale"); let locale = require("locale");
let widgets = require("widget_utils"); let widgets = require("widget_utils");
@ -224,9 +224,7 @@
return function(boxes) { return function(boxes) {
date = new Date(); date = new Date();
g.clear(); g.clear();
if (bgImage) { background.fillRect(Bangle.appRect);
g.drawImage(bgImage, 0, 0);
}
if (boxes.time) { if (boxes.time) {
boxes.time.string = modString(boxes.time, locale.time(date, isBool(boxes.time.short, true) ? 1 : 0)); boxes.time.string = modString(boxes.time, locale.time(date, isBool(boxes.time.short, true) ? 1 : 0));
updatePerMinute = isBool(boxes.time.short, true); updatePerMinute = isBool(boxes.time.short, true);
@ -412,4 +410,4 @@
widgets.swipeOn(); widgets.swipeOn();
modSetColor(); modSetColor();
setup(); setup();
} }