forked from FOSS/BangleApps
widbtstates: generate better js indexing
with a slight typescript hack - avoid generating a new string when we can use a booleanmaster
parent
22078e87cc
commit
7a431011df
|
@ -1 +1,2 @@
|
|||
0.01: New App!
|
||||
0.02: Improve generated JS
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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=="),
|
||||
|
|
Loading…
Reference in New Issue