Updated on 2026-08-14
This commit is contained in:
parent
0e980df356
commit
082492ee26
15 changed files with 3208 additions and 284 deletions
|
|
@ -46,10 +46,6 @@ internal class WalletWarningsAnalyticsSender @Inject constructor(
|
|||
is WalletNotification.Informational.MissingAddresses -> MainScreen.MissingAddresses
|
||||
is WalletNotification.RateApp -> MainScreen.HowDoYouLikeTangem
|
||||
is WalletNotification.Critical.BackupError -> MainScreen.BackupError
|
||||
is WalletNotification.TravalaPromo -> TokenSwapPromoAnalyticsEvent.NoticePromotionBanner(
|
||||
source = AnalyticsParam.ScreensSources.Main,
|
||||
programName = TokenSwapPromoAnalyticsEvent.ProgramName.Travala,
|
||||
)
|
||||
is WalletNotification.SwapPromo -> TokenSwapPromoAnalyticsEvent.NoticePromotionBanner(
|
||||
source = AnalyticsParam.ScreensSources.Main,
|
||||
programName = TokenSwapPromoAnalyticsEvent.ProgramName.OKX,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import com.tangem.core.ui.extensions.TextReference
|
|||
import com.tangem.core.ui.extensions.pluralReference
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.extensions.wrappedList
|
||||
import com.tangem.core.ui.utils.DateTimeFormatters
|
||||
import com.tangem.feature.wallet.impl.R
|
||||
import org.joda.time.DateTime
|
||||
|
||||
|
|
@ -174,34 +173,6 @@ sealed class WalletNotification(val config: NotificationConfig) {
|
|||
),
|
||||
)
|
||||
|
||||
data class TravalaPromo(
|
||||
val startDateTime: DateTime,
|
||||
val endDateTime: DateTime,
|
||||
val bannerLink: String?,
|
||||
val onBookNowButtonClick: (String?) -> Unit,
|
||||
val onCloseClick: () -> Unit,
|
||||
) : WalletNotification(
|
||||
config = NotificationConfig(
|
||||
title = resourceReference(id = R.string.main_travala_promotion_title),
|
||||
subtitle = resourceReference(
|
||||
id = R.string.main_travala_promotion_description,
|
||||
wrappedList(
|
||||
DateTimeFormatters.formatDate(startDateTime, DateTimeFormatters.dateMMMMd),
|
||||
DateTimeFormatters.formatDate(endDateTime, DateTimeFormatters.dateMMMMd),
|
||||
),
|
||||
),
|
||||
// Stub. Travala has its own Composable implementation with correct img
|
||||
iconResId = R.drawable.ic_star_24,
|
||||
// Stub. Travala has its own Composable implementation with correct img
|
||||
backgroundResId = R.drawable.ic_star_24,
|
||||
buttonsState = NotificationConfig.ButtonsState.SecondaryButtonConfig(
|
||||
onClick = { onBookNowButtonClick(bannerLink) },
|
||||
text = resourceReference(R.string.main_travala_promotion_button),
|
||||
),
|
||||
onCloseClick = onCloseClick,
|
||||
),
|
||||
)
|
||||
|
||||
data class SwapPromo(
|
||||
val startDateTime: DateTime,
|
||||
val endDateTime: DateTime,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import androidx.compose.foundation.lazy.items
|
|||
import androidx.compose.ui.Modifier
|
||||
import com.tangem.core.ui.components.notifications.Notification
|
||||
import com.tangem.core.ui.components.notifications.OkxPromoNotification
|
||||
import com.tangem.core.ui.components.notifications.TravalaNotificationWithBackground
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletNotification
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
|
@ -34,12 +33,6 @@ internal fun LazyListScope.notifications(configs: ImmutableList<WalletNotificati
|
|||
modifier = modifier.animateItemPlacement(),
|
||||
)
|
||||
}
|
||||
is WalletNotification.TravalaPromo -> {
|
||||
TravalaNotificationWithBackground(
|
||||
config = it.config,
|
||||
modifier = modifier.animateItemPlacement(),
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
Notification(
|
||||
config = it.config,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue