mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-24 00:27:33 +01:00
58d4ebf509
Activity data fetching on Huami devices was filled with duplicated code, and the handleActivityFetchFinish was called from multiple places where it did not make sense. This made us signal to the band that activity fetch was finished when it sometimes was not, causing some race condititions that would make activity fetch fail or get stuck. This refactor defines a clear "processBufferedData" that is called upstream, signaling to the fetch operation that we have received all data and the buffer can be processed. All handling of metadata and ack messages is also delegated to the upstream class.