bikespeedo: toggle recording on btn press
parent
598940e90e
commit
12e6e4b2b0
|
|
@ -535,6 +535,20 @@ if (cfg.record && WIDGETS["recorder"]) {
|
||||||
|
|
||||||
if (cfg.recordStopOnExit)
|
if (cfg.recordStopOnExit)
|
||||||
E.on('kill', () => WIDGETS["recorder"].setRecording(false));
|
E.on('kill', () => WIDGETS["recorder"].setRecording(false));
|
||||||
|
|
||||||
|
Bangle.setUI(
|
||||||
|
"custom",
|
||||||
|
() => {
|
||||||
|
const wid = WIDGETS["recorder"];
|
||||||
|
const active = wid.isRecording();
|
||||||
|
|
||||||
|
if(active)
|
||||||
|
wid.setRecording(false);
|
||||||
|
else
|
||||||
|
wid.setRecording(true, { force: "append" });
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue