-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
⚡ Simplify 'permissionsBuilder()' ext fun by merging the params into a single 'vararg' param #379
Comments
I've been busy sorry, so I'm pretty late in answering this.
This was done primarly to avoid to pass an empty
Your suggestion makes sense, to avoid to make breaking changes though, I'm adding the possibility to pass a Hence, to make an example, there will be these two functions: fun Type.permissionsBuilder(firstPermission: String, vararg others: String)
fun Type.permissionsBuilder(permissions: List<String>) Thanks for the suggestion! |
PR to implement this: #393 The next release will contain this, thanks again for the suggestion. |
This looks perfect!! Welcome & thanks. ❤️💯🚀🚀 |
@fondesa |
So much sorry @RahulSDeshpande, I didn't used much Github lately. I released the version 3.5.0 with this new API! |
Thanks @fondesa bro!! ❤️ |
Description
Simplify
permissionsBuilder()
extension function by merging both the params into one.In short, add and extra remove
firstPermission: String
& only keep a single param asvararg permissions: String
.Motivation
I am using
3.4.0
version of this library.This feature would be very useful, as the developer will have to only pass the param as
vararg
in array format (or even a list).Example
Currently we have to do it like this:
We cannot do this:
This is what I am suggesting as a part of this feature request.
I really loved how you did for this ext function in
CheckPermissionsStatus.kt
:I know you have a pretty good architecture setup for this.
This would impact many places, primarily at:
PermissionRequestBuilder
BasePermissionRequestBuilder
checkPermissionsStatus()
So, my suggestion is also applicable exactly for the
checkPermissionsStatus()
ext fun.Please let me know. ✋🏼
❤️ Amazing library btw.
❤️ I would really love to contribute, please let me know.
The text was updated successfully, but these errors were encountered: