launcher 0.09: Bangle.js 2 - pressing the button goes back to clock (fix #971)
After 10s of being locked, the launcher goes back to the clock screenmaster
parent
5b967184b6
commit
9d26a6448e
|
|
@ -104,7 +104,7 @@
|
||||||
"id": "launch",
|
"id": "launch",
|
||||||
"name": "Launcher",
|
"name": "Launcher",
|
||||||
"shortName": "Launcher",
|
"shortName": "Launcher",
|
||||||
"version": "0.08",
|
"version": "0.09",
|
||||||
"description": "This is needed to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
|
"description": "This is needed to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "launch",
|
"type": "launch",
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,5 @@
|
||||||
0.06: Use Bangle.setUI for buttons
|
0.06: Use Bangle.setUI for buttons
|
||||||
0.07: Theme colours fix
|
0.07: Theme colours fix
|
||||||
0.08: Merge Bangle.js 1 and 2 launchers
|
0.08: Merge Bangle.js 1 and 2 launchers
|
||||||
|
0.09: Bangle.js 2 - pressing the button goes back to clock (fix #971)
|
||||||
|
After 10s of being locked, the launcher goes back to the clock screen
|
||||||
|
|
|
||||||
|
|
@ -64,3 +64,12 @@ Bangle.setUI("updown",dir=>{
|
||||||
});
|
});
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
// 10s of inactivity goes back to clock
|
||||||
|
if (Bangle.setLocked) Bangle.setLocked(false); // unlock initially
|
||||||
|
var lockTimeout;
|
||||||
|
Bangle.on('lock', locked => {
|
||||||
|
if (lockTimeout) clearTimeout(lockTimeout);
|
||||||
|
lockTimeout = undefined;
|
||||||
|
if (locked)
|
||||||
|
lockTimeout = setTimeout(_=>load(), 10000);
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -46,3 +46,16 @@ E.showScroller({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// pressing button goes back
|
||||||
|
setWatch(_=>load(), BTN1, {edge:"falling"});
|
||||||
|
|
||||||
|
// 10s of inactivity goes back to clock
|
||||||
|
Bangle.setLocked(false); // unlock initially
|
||||||
|
var lockTimeout;
|
||||||
|
Bangle.on('lock', locked => {
|
||||||
|
if (lockTimeout) clearTimeout(lockTimeout);
|
||||||
|
lockTimeout = undefined;
|
||||||
|
if (locked)
|
||||||
|
lockTimeout = setTimeout(_=>load(), 10000);
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue