forked from FOSS/BangleApps
fix settings.js
parent
059a2e7af7
commit
4ce840a60f
|
@ -18,3 +18,4 @@
|
|||
0.17: Add automatic translation of bar chart labels
|
||||
0.18: Show step goal in daily step chart
|
||||
0.19: Can show notification when daily step goal is reached
|
||||
0.20: Fix the settings page, it would not update settings correctly.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "health",
|
||||
"name": "Health Tracking",
|
||||
"shortName": "Health",
|
||||
"version": "0.19",
|
||||
"version": "0.20",
|
||||
"description": "Logs health data and provides an app to view it",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,system,health",
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
stepGoalNotification: false
|
||||
}, require("Storage").readJSON("health.json", true) || {});
|
||||
|
||||
function setSettings() {
|
||||
require("Storage").writeJSON("health.json", settings);
|
||||
}
|
||||
E.showMenu({
|
||||
"": { title: /*LANG*/"Health Tracking" },
|
||||
|
||||
|
@ -22,7 +25,7 @@
|
|||
][v],
|
||||
onchange: v => {
|
||||
settings.hrm = v;
|
||||
setSettings(settings);
|
||||
setSettings();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -33,7 +36,7 @@
|
|||
step: 250,
|
||||
onchange: v => {
|
||||
settings.stepGoal = v;
|
||||
setSettings(settings);
|
||||
setSettings();
|
||||
}
|
||||
},
|
||||
/*LANG*/"Step Goal Notification": {
|
||||
|
@ -45,8 +48,4 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
function setSettings(settings) {
|
||||
require("Storage").writeJSON("health.json", settings);
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue