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(),