|
|
|
@ -68,6 +68,7 @@ import androidx.compose.ui.graphics.toArgb
|
|
|
|
|
import androidx.compose.ui.layout.layout
|
|
|
|
|
import androidx.compose.ui.platform.LocalContext
|
|
|
|
|
import androidx.compose.ui.platform.LocalDensity
|
|
|
|
|
import androidx.compose.ui.platform.LocalInspectionMode
|
|
|
|
|
import androidx.compose.ui.platform.testTag
|
|
|
|
|
import androidx.compose.ui.res.painterResource
|
|
|
|
|
import androidx.compose.ui.res.stringResource
|
|
|
|
@ -406,6 +407,9 @@ fun TopicIcon(
|
|
|
|
|
@Composable
|
|
|
|
|
@OptIn(ExperimentalPermissionsApi::class)
|
|
|
|
|
private fun NotificationPermissionEffect() {
|
|
|
|
|
// Permission requests should only be made from an Activity Context, which is not present
|
|
|
|
|
// in previews
|
|
|
|
|
if (LocalInspectionMode.current) return
|
|
|
|
|
if (VERSION.SDK_INT < VERSION_CODES.TIRAMISU) return
|
|
|
|
|
val notificationsPermissionState = rememberPermissionState(
|
|
|
|
|
android.Manifest.permission.POST_NOTIFICATIONS,
|
|
|
|
|