Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve background query handling (#38)
# improve background query handling ## ♻️ Current situation & Problem HealthKit sometimes sends a background query notification even though no new samples were added to the database (i've seen this happen in e.g. the simulator, my guess is that in that case even though there simply aren't any samples it for some reason still wants to send one initial query update). This interferes a bit with our existing sample type correctness checking (there is a check that the array of new samples contains at least one sample with the queried-for sample type, which is of course false in this case). This PR reworks this a bit, essentially simply adding a check to return early if the array is empty. ## ⚙️ Release Notes - improved handling of background queries to avoid unnecessary error messages printed to stdout ## 📚 Documentation n/a ## ✅ Testing n/a ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md). --------- Signed-off-by: Lukas Kollmer <hey@lukaskollmer.de>
- Loading branch information