mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
When determining the Health Connect sync start point for activity-sample based data types (ACTIVITY, SLEEP), getFirstSampleTimestamp inspects only the single oldest row and discards it if its timestamp is not positive. If that oldest row has a 0 or otherwise non-positive timestamp, the start point is null and sync is skipped for every data type backed by that table, while data types on separate tables keep syncing. Add a getFirstActivitySample(after) overload returning the oldest sample with a timestamp strictly greater than the given limit, and use it with 0 so an invalid head row no longer disables start-point determination.