Skip to content

Commit 7dec07a

Browse files
committed
[BOOK-364] fix: Android 13 미만에서 권한 동기화 누락 수정
1 parent fc249ab commit 7dec07a

File tree

1 file changed

+8
-4
lines changed
  • feature/home/src/main/kotlin/com/ninecraft/booket/feature/home

1 file changed

+8
-4
lines changed

feature/home/src/main/kotlin/com/ninecraft/booket/feature/home/HomeUi.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)