mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 13:27:47 +01:00
Only asks for notification permissions on Tiramisu
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.vitorpamplona.amethyst.ui.screen.loggedIn
|
||||
|
||||
import android.Manifest
|
||||
import android.os.Build
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -105,6 +106,7 @@ fun NotificationScreen(
|
||||
@OptIn(ExperimentalPermissionsApi::class)
|
||||
@Composable
|
||||
fun CheckifItNeedsToRequestNotificationPermission() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
val notificationPermissionState = rememberPermissionState(
|
||||
Manifest.permission.POST_NOTIFICATIONS
|
||||
)
|
||||
@@ -115,6 +117,7 @@ fun CheckifItNeedsToRequestNotificationPermission() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun WatchAccountForNotifications(
|
||||
|
||||
@@ -5,7 +5,7 @@ buildscript {
|
||||
compose_ui_version = '1.4.3'
|
||||
nav_version = "2.6.0"
|
||||
room_version = "2.4.3"
|
||||
accompanist_version = '0.30.0'
|
||||
accompanist_version = '0.30.1'
|
||||
coil_version = '2.4.0'
|
||||
vico_version = '1.7.1'
|
||||
exoplayer_version = '1.1.0'
|
||||
|
||||
Reference in New Issue
Block a user