Skip to content

Commit

Permalink
Merge pull request #3681 from bobrippling/feat/widbtstates-opt
Browse files Browse the repository at this point in the history
widbtstates: generate better js indexing
  • Loading branch information
bobrippling authored Dec 3, 2024
2 parents d24aefc + 7a43101 commit 615ab14
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/widbtstates/ChangeLog
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0.01: New App!
0.02: Improve generated JS
2 changes: 1 addition & 1 deletion apps/widbtstates/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "widbtstates",
"name": "Bluetooth States",
"version": "0.01",
"version": "0.02",
"description": "If active, shows a white bluetooth icon, if connected, a blue one (nothing if sleeping)",
"icon": "widget.png",
"type": "widget",
Expand Down
2 changes: 1 addition & 1 deletion apps/widbtstates/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
if (state == 0)
return;
g.reset();
g.setColor(colours[state]["".concat(g.theme.dark)]);
g.setColor(colours[state][g.theme.dark]);
g.drawImage(atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="), this.x + 2, this.y + 2);
},
width: width(),
Expand Down
2 changes: 1 addition & 1 deletion apps/widbtstates/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

g.reset();

g.setColor(colours[state][`${g.theme.dark}`]);
g.setColor(colours[state][g.theme.dark as unknown as `${boolean}`]);

g.drawImage(
atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),
Expand Down

0 comments on commit 615ab14

Please sign in to comment.