From b0f3c538f9746a8c5fccbd71105fc07b2d77d17f Mon Sep 17 00:00:00 2001 From: Mohamad Jaara Date: Mon, 26 Aug 2024 13:14:41 +0000 Subject: [PATCH] fix: app asking for notification permission on each navigation to the HomeScreen[WPB-10750] (#3374) --- 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