Skip to content

Commit 2857d35

Browse files
committed
feat: Update release version and refine permission state checks
- Change `allRequiredGranted` to public in `PermissionState`. - Change `isGranted` to public in `PermissionState`.
1 parent 0c0f9fc commit 2857d35

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99

1010
env:
11-
VERSION_NAME: 0.0.1+3 # Update this value for each release
11+
VERSION_NAME: 0.0.1+4 # Update this value for each release
1212

1313
jobs:
1414
release:

permissions-compose/src/main/java/com/meticha/permissions_compose/PermissionState.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class PermissionState(
186186
/**
187187
* Checks if all required permissions are actually granted
188188
*/
189-
internal fun allRequiredGranted(): Boolean {
189+
fun allRequiredGranted(): Boolean {
190190
isRequiredPermissionGranted = allPermissions
191191
.filter { it.isRequired }
192192
.all { isGranted(it.permission) }
@@ -196,7 +196,7 @@ class PermissionState(
196196
/**
197197
* Checks if a specific permission is granted
198198
*/
199-
private fun isGranted(permission: String): Boolean {
199+
fun isGranted(permission: String): Boolean {
200200
val context = requireNotNull(contextRef.get())
201201
return context.checkSelfPermission(permission) == PackageManager.PERMISSION_GRANTED
202202
}

0 commit comments

Comments
 (0)