File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
feature/home/src/main/kotlin/com/ninecraft/booket/feature/home Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,15 @@ internal fun HomeUi(
6969 LaunchedEffect (Unit ) {
7070 val isGranted = checkSystemNotificationEnabled(context)
7171
72- if (isGranted) {
72+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
73+ if (isGranted) {
74+ state.eventSink(HomeUiEvent .OnNotificationPermissionResult (isGranted))
75+ } else {
76+ val permission = Manifest .permission.POST_NOTIFICATIONS
77+ permissionLauncher.launch(permission)
78+ }
79+ } else {
7380 state.eventSink(HomeUiEvent .OnNotificationPermissionResult (isGranted))
74- } else if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
75- val permission = Manifest .permission.POST_NOTIFICATIONS
76- permissionLauncher.launch(permission)
7781 }
7882 }
7983 }
You can’t perform that action at this time.
0 commit comments