recorder: fix accessing WIDGETS

master
Rob Pilling 2024-04-17 21:19:37 +01:00
parent c2ea454a3b
commit d7cab672b7
3 changed files with 4 additions and 3 deletions

View File

@ -52,3 +52,4 @@
0.41: Fix exit from plots and graphs would easily react twice, going back two
levels instead of one.
0.42: Minor code improvements
0.43: Fix interaction on clocks without widgets

View File

@ -11,7 +11,7 @@
{
name: "Toggle",
get: () => {
const w = WIDGETS && WIDGETS["recorder"];
const w = typeof WIDGETS !== "undefined" && WIDGETS["recorder"];
return w && w.isRecording() ? {
text: "Recording",
@ -24,7 +24,7 @@
};
},
run: () => {
const w = WIDGETS && WIDGETS["recorder"];
const w = typeof WIDGETS !== "undefined" && WIDGETS["recorder"];
if(w){
Bangle.buzz();
w.setRecording(!w.isRecording(), { force: "append" });

View File

@ -2,7 +2,7 @@
"id": "recorder",
"name": "Recorder",
"shortName": "Recorder",
"version": "0.42",
"version": "0.43",
"description": "Record GPS position, heart rate and more in the background, then download to your PC.",
"icon": "app.png",
"tags": "tool,outdoors,gps,widget,clkinfo",