From 493e29620e7a1cb2bfaabea54f333f78bd29d036 Mon Sep 17 00:00:00 2001 From: mohamadjaara Date: Mon, 26 Aug 2024 14:33:07 +0200 Subject: [PATCH] fix: app asking for notification permission on each navigation to the HomeScreen --- app/src/main/kotlin/com/wire/android/ui/home/HomeScreen.kt | 2 +- .../android/util/permission/PermissionsDeniedRequestDialog.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/HomeScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/HomeScreen.kt index e492211dc77..83d0d9737ee 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/HomeScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/HomeScreen.kt @@ -116,7 +116,7 @@ fun HomeScreen( rememberShowNotificationsPermissionFlow( onPermissionGranted = { /* do nothing */ }, onPermissionDenied = showNotificationsPermissionDeniedDialog, - onPermissionPermanentlyDenied = showNotificationsPermissionDeniedDialog, + onPermissionPermanentlyDenied = { /* do nothing */ }, ) val lifecycleOwner = LocalLifecycleOwner.current diff --git a/app/src/main/kotlin/com/wire/android/util/permission/PermissionsDeniedRequestDialog.kt b/app/src/main/kotlin/com/wire/android/util/permission/PermissionsDeniedRequestDialog.kt index 099737db7c6..834749e6c41 100644 --- a/app/src/main/kotlin/com/wire/android/util/permission/PermissionsDeniedRequestDialog.kt +++ b/app/src/main/kotlin/com/wire/android/util/permission/PermissionsDeniedRequestDialog.kt @@ -36,8 +36,8 @@ import com.wire.android.util.extension.openAppInfoScreen */ @Composable fun PermissionsDeniedRequestDialog( - @StringRes title: Int = R.string.app_permission_dialog_title, @StringRes body: Int, + @StringRes title: Int = R.string.app_permission_dialog_title, @StringRes positiveButton: Int = R.string.app_permission_dialog_settings_positive_button, @StringRes negativeButton: Int = R.string.app_permission_dialog_settings_negative_button, onDismiss: () -> Unit