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

health: bug in requestAuthorization #258

Merged
merged 2 commits into from Jan 9, 2021
Merged

health: bug in requestAuthorization #258

merged 2 commits into from Jan 9, 2021

Conversation

kvedala
Copy link
Contributor

@kvedala kvedala commented Jan 8, 2021

The Problem

When the function requestAuthorization is invoked multiple times with a list of types containing the type BODY_MASS_INDEX, the function tends to incrementally add HEIGHT and WEIGHT on every invocation. The .toSet().toList() does not seem to remove the duplicates.

Proposed solution

Suggested changes will only add the data types if they are not already present in the input list. This avoids the call to .toSet.toList().

When the function `requestAuthorization` is invoked multiple times with a list of types containing the type `BODY_MASS_INDEX`, the function tends to incrementally add `HEIGHT` and `WEIGHT` on every invocation. 
The suggested changes will only add the data types if they are not already present in the input list.
@thomasnilsson thomasnilsson merged commit dfaa905 into cph-cachet:master Jan 9, 2021
@kvedala kvedala deleted the patch-1 branch January 11, 2021 04:42
hibitness-quan-nguyen2 pushed a commit to hibitness/flutter-plugins that referenced this pull request Dec 18, 2023
health: bug in requestAuthorization
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

Successfully merging this pull request may close these issues.

None yet

2 participants