From 25a4e88ca7c54ddc1c986c004993d26f6742f522 Mon Sep 17 00:00:00 2001 From: MohamedRejeb Date: Tue, 3 Sep 2024 10:50:00 +0100 Subject: [PATCH] Refactor isAlwaysGranted --- .../calf/permissions/PermissionsUtil.android.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/calf-permissions/src/androidMain/kotlin/com/mohamedrejeb/calf/permissions/PermissionsUtil.android.kt b/calf-permissions/src/androidMain/kotlin/com/mohamedrejeb/calf/permissions/PermissionsUtil.android.kt index cba08b4..2a6e540 100644 --- a/calf-permissions/src/androidMain/kotlin/com/mohamedrejeb/calf/permissions/PermissionsUtil.android.kt +++ b/calf-permissions/src/androidMain/kotlin/com/mohamedrejeb/calf/permissions/PermissionsUtil.android.kt @@ -169,11 +169,10 @@ internal fun Permission.isAlwaysGranted(): Boolean = this == Permission.WriteStorage && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> true -// Permission.Gallery, -// Permission.ReadStorage, -// Permission.WriteStorage, -// Permission.RemoteNotification, -// -> true + + this == Permission.RemoteNotification -> + true + else -> false }