mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
The sync state cursor was advancing to the slice end timestamp unconditionally, even when no records were written. Late-arriving data (sleep, workouts, VO2Max, etc.) that arrives after the cursor has already advanced past it would be permanently skipped. Each syncer now reports the latest timestamp of records actually inserted into Health Connect. The sync cursor advances to max(currentPersisted, latestRecordTimestamp) instead of sliceEndTimestamp. If no records were written for a slice, the cursor stays put. This handles all late-arriving data generically without needing per-data-type special-casing.