mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
The Xiaomi two-phase activity fetch (today + past) could fire the data-finish signal that triggers downstream consumers before all DETAILS files had been parsed, so a consumer reading the database in that gap saw an incomplete picture. Hold the finish signal until both fetch phases have delivered and all files are parsed. Use an AtomicBoolean for the fetch-hold flag and set awaitingPastResponse before the fetch starts to avoid signalling between the two phases.