Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not import Sleep entries if they cross over a predicate time period #69

Open
SamBergeron opened this issue Feb 26, 2024 · 0 comments

Comments

@SamBergeron
Copy link
Contributor

Describe the bug
This is the same issue that was happening with workout but it the same with category imports (sleep specifically) this would also fix it for all other category imports.
Currently there is no way to do category imports that are not explicitly inside the predicate time range.

To Reproduce
Create a sleep entry in Apple health, starting at 11:30pm and ending at 12:30 am the next day
Create a predicate for the starting day from 12:00 to 12:00 the next day.
The sleep entry is not imported.
The sleep is also not imported if you do the same thing for the next day.

i.e if you import on 24hr increments for a day, and you workout overlaps you cannot import it in any day whatsoever because import logic is strict. The workout start time and end time must be included entirely in the predicate range.

Expected behavior
You are able to import overlapping sleep entries

Additional context
Native healthkit exposes "options" you can pass to samples query but those options are not available in the flutter plugin, so there's nothing we can do about it. I've coded a PR for this I will link to

This is essentially the exact same thing as #66 but we just applied the same logic to category entries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant