Skip to content

Commit

Permalink
[#76] Add a field in MultiplePermissionState: permissionsRequiringRat…
Browse files Browse the repository at this point in the history
…ionale
  • Loading branch information
PatilShreyas committed Mar 3, 2024
1 parent 3efb413 commit 07a8e6c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,11 @@ data class MultiplePermissionState(val permissions: List<PermissionState>) {
* List of permissions which are denied / not granted by user
*/
val deniedPermissions by lazy { permissions.filter { !it.isGranted }.map { it.permission } }

/**
* List of permissions which are required to show rationale
*/
val permissionsRequiringRationale by lazy {
permissions.filter { it.isRationaleRequired == true }.map { it.permission }
}
}

0 comments on commit 07a8e6c

Please sign in to comment.