From 46bf6907a9ba618b579a2b28c6de8d055c3eccec Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 22 Jul 2025 14:52:45 +0100 Subject: [PATCH] health 0.36: Fix Distance graphs that used '1*' to remove the suffix --- apps/health/ChangeLog | 3 ++- apps/health/app.js | 2 +- apps/health/metadata.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/health/ChangeLog b/apps/health/ChangeLog index 167ee26df..99e2490c9 100644 --- a/apps/health/ChangeLog +++ b/apps/health/ChangeLog @@ -38,4 +38,5 @@ 0.33: Ensure readAllRecordsSince always includes the current day Speed improvements (put temporary functions in RAM where possible) 0.34: Fix readFullDatabase (was skipping first month of data) -0.35: Update boot/lib.min.js \ No newline at end of file +0.35: Update boot/lib.min.js +0.36: Fix Distance graphs that used '1*' to remove the suffix \ No newline at end of file diff --git a/apps/health/app.js b/apps/health/app.js index 6a461da2b..d3dda2e2f 100644 --- a/apps/health/app.js +++ b/apps/health/app.js @@ -32,7 +32,7 @@ function menuStepCount() { } function menuDistance() { - const distMult = 1*require("locale").distance(myprofile.strideLength, 2); // hackish: this removes the distance suffix, e.g. 'm' + const distMult = parseFloat(require("locale").distance(myprofile.strideLength, 2)); // this removes the distance suffix, e.g. 'm' E.showMenu({ "": { title:/*LANG*/"Distance" }, /*LANG*/"< Back": () => menuStepCount(), diff --git a/apps/health/metadata.json b/apps/health/metadata.json index b2ecb3e8b..36497c5ba 100644 --- a/apps/health/metadata.json +++ b/apps/health/metadata.json @@ -2,7 +2,7 @@ "id": "health", "name": "Health Tracking", "shortName": "Health", - "version": "0.35", + "version": "0.36", "description": "Logs health data and provides an app to view it", "icon": "app.png", "screenshots" : [ { "url":"screenshot.png" } ],