From 5a9187d436cad353276144658c54440461ee551f Mon Sep 17 00:00:00 2001 From: Iliyan Germanov Date: Sat, 11 Jun 2022 15:47:36 +0300 Subject: [PATCH] Add "Join Telegram" card in User Journey --- .../deprecated/logic/CustomerJourneyLogic.kt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/CustomerJourneyLogic.kt b/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/CustomerJourneyLogic.kt index c989a63fba..68ea037eab 100644 --- a/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/CustomerJourneyLogic.kt +++ b/app/src/main/java/com/ivy/wallet/domain/deprecated/logic/CustomerJourneyLogic.kt @@ -55,6 +55,7 @@ class CustomerJourneyLogic( didYouKnow_expensesPieChart(), rateUsCard(), shareIvyWalletCard(), + joinIvyTelegramCard(), // buyLifetimeOfferCard(), makeReportCard(), rateUsCard_2(), @@ -179,6 +180,22 @@ class CustomerJourneyLogic( } ) + fun joinIvyTelegramCard() = CustomerJourneyCardData( + id = "join_ivy_telegram", + condition = { trnCount, _, _ -> + trnCount >= 16 + }, + description = "It seems like that you're enjoying Ivy Wallet! Feel free join our invite-only Ivy Telegram Community and make our app better :)", + title = "Ivy Community", + cta = "Join now", + ctaIcon = R.drawable.ic_telegram_24dp, + backgroundColor = Blue, + hasDismiss = true, + onAction = { navigation, _, _ -> + navigation.navigateTo(Paywall(paywallReason = null)) + } + ) + fun buyLifetimeOfferCard() = CustomerJourneyCardData( id = "buy_lifetime_offer", condition = { trnCount, _, ivyContext -> @@ -346,6 +363,18 @@ private fun PreviewShareIvyWallet() { } } +@Preview +@Composable +private fun PreviewJoinTelegram() { + IvyWalletComponentPreview { + CustomerJourneyCard( + cardData = CustomerJourneyLogic.joinIvyTelegramCard(), + onCTA = { }, + onDismiss = {} + ) + } +} + @Preview @Composable private fun PreviewBuyLifetimeOffer() {