-
-
Notifications
You must be signed in to change notification settings - Fork 841
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
Fix android requestMultiplePermissions #609
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting - it looks more correct / easier to read by using the necessary / already existing permissionsToCheck collection to also drive the iterations and completion condition...but, I don't understand how this fixes the issue? I am certain I'm just not reading it and seeing it, but how where was the issue in the original extra-counter style leading to the problem, such that using the collection directly fixes it? 🤔
The "buggy" part is the last part in the |
Could you only fix the issue and remove other changes? The android part of this module is a slightly edited version of https://github.com/facebook/react-native/blob/b161241db2ef74d2e4bff36d4972f5f0312dcc44/ReactAndroid/src/main/java/com/facebook/react/modules/permissions/PermissionsModule.java#L143 and I really want to keep it as close as the original for easier updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the error and correction are obvious! I think the previous version was a bit cleaner but also have a different project that has to track an upstream source so I understand now wanting better code even if it's better.
Just tried it, the fix works flawlessly 👍 |
thanks guys, this was driving me crazy and i was using workarounds to mitigate it! |
Summary
Fix for #608
Compatibility
Checklist
I added the documentation inREADME.md
CHANGELOG.md
(where is the changelog 😄 )I updated the typed files (TS and Flow)(no change in js)I added a sample use of the API in the example project (example/App.js
)