diff --git a/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/ui/PermissionsUi.kt b/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/ui/PermissionsUi.kt index acdd0de..b1060d5 100644 --- a/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/ui/PermissionsUi.kt +++ b/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/ui/PermissionsUi.kt @@ -1,5 +1,6 @@ package org.unifiedpush.distributor.nextpush.activities.ui +import android.os.Build import androidx.compose.material3.AlertDialog import androidx.compose.material3.Text import androidx.compose.material3.TextButton @@ -15,6 +16,9 @@ import org.unifiedpush.distributor.nextpush.R @Preview @Composable fun PermissionsUi(onDone: () -> Unit = {}) { + if (Build.VERSION.SDK_INT < 33) { + onDone() + } val notificationsPermissionState = rememberPermissionState( android.Manifest.permission.POST_NOTIFICATIONS @@ -34,7 +38,7 @@ fun PermissionsUi(onDone: () -> Unit = {}) { TextButton( onClick = { notificationsPermissionState.launchPermissionRequest() - onDone + onDone() } ) { Text(stringResource(android.R.string.ok))