gbridge: fix HRM setting

The settings menu didn't handle `undefined` value for `hrm` properly, so
you were unable to toggle it.
Fixed by forcing the value to a boolean.
pull/680/head
Richard de Boer 2021-02-28 21:55:29 +01:00
parent 6df020adc0
commit 427fd49fa3
3 changed files with 4 additions and 3 deletions

View File

@ -139,7 +139,7 @@
{ "id": "gbridge",
"name": "Gadgetbridge",
"icon": "app.png",
"version":"0.20",
"version":"0.21",
"description": "The default notification handler for Gadgetbridge notifications from Android",
"tags": "tool,system,android,widget",
"readme": "README.md",
@ -2905,5 +2905,5 @@
{"name":"arrow.app.js","url":"app.js"},
{"name":"arrow.img","url":"icon.js","evaluate":true}
]
}
}
]

View File

@ -20,3 +20,4 @@
0.18: Added reporting of step count and HRM (new Gadgetbridges can now log this)
0.19: Support for call incoming/start/end
0.20: Reduce memory usage
0.21: Fix HRM setting

View File

@ -31,7 +31,7 @@
},
"Find Phone" : function() { E.showMenu(findPhone); },
"Record HRM" : {
value: settings().hrm,
value: !!settings().hrm,
format: v => v?"Yes":"No",
onchange: v => updateSetting('hrm', v)
},