Updated on 2026-08-14
This commit is contained in:
parent
d5fcf732e5
commit
a8e621c2c4
4 changed files with 9 additions and 8 deletions
|
|
@ -3,7 +3,7 @@ package com.tangem.features.pushnotifications.impl.model
|
|||
internal interface PushNotificationsClickIntents {
|
||||
fun onAllowClick()
|
||||
|
||||
fun onLaterClick()
|
||||
fun onLaterClick(isFromBs: Boolean)
|
||||
|
||||
fun onAllowPermission()
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue