bikespeedo: toggle recording on btn press

pull/2775/head
Rob Pilling 2023-05-25 21:01:42 +01:00
parent 598940e90e
commit 12e6e4b2b0
1 changed files with 14 additions and 0 deletions

View File

@ -535,6 +535,20 @@ if (cfg.record && WIDGETS["recorder"]) {
if (cfg.recordStopOnExit)
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 {
start();
}