Skip to content

Use Health Connect's daily totals for steps, distance and active energy - #1391

Open
strobeskinzzz wants to merge 1 commit into
wger-project:masterfrom
strobeskinzzz:fix/health-platform-totals
Open

strobeskinzzz wants to merge 1 commit into
wger-project:masterfrom
strobeskinzzz:fix/health-platform-totals

Conversation

@strobeskinzzz

@strobeskinzzz strobeskinzzz commented Oct 11, 2026 •

Copy link
Copy Markdown

Proposed Changes

  • Steps, distance and active energy (the daily-sum metrics) now take each day's total from Health Connect's aggregate API, which resolves overlapping records using the user's data source priority. Previously the raw records were added up, so overlapping records were counted twice: a watch's interval buckets plus its separate workout record, or two apps covering the same time.
  • Falls back to the raw sum if the platform total is unavailable. iOS is unchanged.

Related Issue(s)

Closes #2535

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Set a 100-character limit to avoid white space diffs (run dart format .)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant