From a8e621c2c4f9b64798bd74ac0fc16f24a75b1f82 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 6 Oct 2025 17:51:19 +0200 Subject: [PATCH] Updated on 2026-08-14 --- .../impl/model/PushNotificationsClickIntents.kt | 2 +- .../pushnotifications/impl/model/PushNotificationsModel.kt | 7 ++++--- .../impl/presentation/ui/PushNotificationsBottomSheet.kt | 4 ++-- .../impl/presentation/ui/PushNotificationsScreen.kt | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsClickIntents.kt b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsClickIntents.kt index ad7b69bc71..17ad5e9b9c 100644 --- a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsClickIntents.kt +++ b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsClickIntents.kt @@ -3,7 +3,7 @@ package com.tangem.features.pushnotifications.impl.model internal interface PushNotificationsClickIntents { fun onAllowClick() - fun onLaterClick() + fun onLaterClick(isFromBs: Boolean) fun onAllowPermission() diff --git a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsModel.kt b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsModel.kt index bd3edb7000..4f796a7ad2 100644 --- a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsModel.kt +++ b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/model/PushNotificationsModel.kt @@ -46,17 +46,18 @@ internal class PushNotificationsModel @Inject constructor( modelScope.launch { notificationsRepository.setUserAllowToSubscribeOnPushNotifications(true) } - analyticHandler.send(PushNotificationAnalyticEvents.ButtonAllow(source)) } - override fun onLaterClick() { + override fun onLaterClick(isFromBs: Boolean) { modelScope.launch { notificationsRepository.setUserAllowToSubscribeOnPushNotifications(false) } analyticHandler.send(PushNotificationAnalyticEvents.ButtonLater(source)) modelScope.launch { - neverRequestPermissionUseCase(PUSH_PERMISSION) + if (isFromBs) { + neverRequestPermissionUseCase(PUSH_PERMISSION) + } neverToInitiallyAskPermissionUseCase(PUSH_PERMISSION) params.modelCallbacks.onDenySystemPermission() if (!params.isBottomSheet) { diff --git a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsBottomSheet.kt b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsBottomSheet.kt index 73d7418dfc..c240a0bc72 100644 --- a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsBottomSheet.kt +++ b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsBottomSheet.kt @@ -41,7 +41,7 @@ internal fun PushNotificationsBottomSheet(config: TangemBottomSheetConfig, conte @Composable internal fun PushNotificationsContent( onAllowClick: () -> Unit, - onLaterClick: () -> Unit, + onLaterClick: (isFromBs: Boolean) -> Unit, onAllowPermission: () -> Unit, onDenyPermission: () -> Unit, ) { @@ -78,7 +78,7 @@ internal fun PushNotificationsContent( }, secondaryButtonText = resourceReference(R.string.common_later), onSecondaryClick = { - onLaterClick() + onLaterClick(true) }, ) } diff --git a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt index 835e3c725a..9129169337 100644 --- a/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt +++ b/features/push-notifications/impl/src/main/java/com/tangem/features/pushnotifications/impl/presentation/ui/PushNotificationsScreen.kt @@ -15,7 +15,7 @@ import kotlinx.collections.immutable.persistentListOf @Composable internal fun PushNotificationsScreen( onAllowClick: () -> Unit, - onLaterClick: () -> Unit, + onLaterClick: (isFromBs: Boolean) -> Unit, onAllowPermission: () -> Unit, onDenyPermission: () -> Unit, ) { @@ -50,7 +50,7 @@ internal fun PushNotificationsScreen( secondaryButton = ShowcaseButtonModel( buttonText = resourceReference(R.string.common_later), onClick = { - onLaterClick() + onLaterClick(false) }, ), modifier = Modifier.systemBarsPadding(),