We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04d497a commit e9d3c1dCopy full SHA for e9d3c1d
apps/lightswitch/lib.js
@@ -10,13 +10,17 @@ exports = {
10
unlockSide: "",
11
tapSide: "right",
12
tapOn: "always",
13
+ isOn: true
14
}, require("Storage").readJSON("lightswitch.json", true) || {});
15
16
// cache lock status
17
var locked = Bangle.isLocked();
18
19
// check to unlock
- if (locked && data.dir === w.unlockSide) Bangle.setLocked();
20
+ if (locked && data.dir === w.unlockSide) {
21
+ Bangle.setLocked();
22
+ if (w.isOn) Bangle.setLCDPower(true);
23
+ }
24
25
// check to flash
26
if (data.dir === w.tapSide && (w.tapOn === "always" || locked === (w.tapOn === "locked"))) require("lightswitch.js").flash();
0 commit comments