Skip to content

Commit d3703a2

Browse files
authored
Correct typo in oldColorIdx variable assignment
Fix typo in indexOf method and clean up unused variables.
1 parent 83f2e2c commit d3703a2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

apps/dailycolorclk/app.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ let changeBGColor = function() {
4444
if (settings.colorPurple) bgColors.push("#B200ED");
4545
if (settings.colorBlack) bgColors.push("#000");
4646

47-
let oldColorIdx = bgColors.indexOf(settings.colorSaved);
47+
let oldColorId = bgColors.indeOf(settings.colorSaved);
4848
if (oldColorIdx !== -1) bgColors.splice(oldColorIdx, 1);
4949
let col = bgColors[(Math.random()*bgColors.length)|0] || "#000";
5050

@@ -77,9 +77,7 @@ let draw = function() {
7777
drawTimeout = setTimeout(draw, 60000 - (Date.now() % 60000));
7878

7979
R = Bangle.appRect;
80-
x = R.w / 2;
81-
y = R.y + R.h / 2 - 6;
82-
if (!settings.hideWidgets) y -= 6;
80+
8381

8482
var date = new Date();
8583
var local_time = require("locale").time(date, 1);

0 commit comments

Comments
 (0)