From b9112bcf180d6d7bb5f8c401ce3cf4af8dd09f0c Mon Sep 17 00:00:00 2001 From: Sidharth Bamba Date: Thu, 14 Nov 2024 19:51:37 +0530 Subject: [PATCH] NTP-11293 | Sidharth Bamba | Remove diwali scratch card bbps (#13521) --- .../bbps/feature/paybill/PayBillViewModel.kt | 32 +- .../ui/BbpsPostPaymentScreenV2.kt | 40 +- ..._np_bbps_scratch_card_with_coin_diwali.xml | 1385 ----------------- .../ic_np_bbps_scratch_stripe_diwali.xml | 103 -- 4 files changed, 11 insertions(+), 1549 deletions(-) delete mode 100644 android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_card_with_coin_diwali.xml delete mode 100644 android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_stripe_diwali.xml diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt index 504d57d6a4..c69c302fb3 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt @@ -83,7 +83,6 @@ import com.navi.common.network.models.RepoResult import com.navi.common.network.models.isSuccessWithData import com.navi.common.upi.SUCCESS import com.navi.common.usecase.LitmusExperimentsUseCase -import com.navi.common.utils.Constants.LITMUS_EXPERIMENT_NAVIPAY_REWARD_DIWALI_ANIMATION import com.navi.common.utils.TemporaryStorageHelper import com.navi.common.utils.toJsonObject import com.navi.payment.nativepayment.utils.getDiscountAdjustedAmount @@ -164,10 +163,6 @@ constructor( private val isRewardsAnimationExperimentationEnabled = _isRewardsAnimationExperimentationEnabled.asStateFlow() - private val _isDiwaliAnimationExperimentationEnabled = MutableStateFlow(false) - private val isDiwaliAnimationExperimentationEnabled = - _isDiwaliAnimationExperimentationEnabled.asStateFlow() - private val _shouldAutoFocusOnAmount = MutableStateFlow(false) val shouldAutoFocusOnAmount = _shouldAutoFocusOnAmount.asStateFlow() @@ -845,7 +840,7 @@ constructor( ) billOrderModel?.toJsonObject()?.let { tStoreOrderHandler.insertOrderToTStoreDb(it) } if (status == SUCCESS) { - if (isDiwaliAnimationExperimentationEnabled.value) { + if (isRewardsAnimationExperimentationEnabled.value) { _goToNextScreen.emit( Pair( BbpsPostPaymentScreenV2Destination( @@ -854,23 +849,6 @@ constructor( isSourcePaymentSummary = true, isRootScreen = isRootScreen, orderReferenceId = orderReferenceId, - isDiwaliThemeEnabled = true, - source = NaviBbpsScreen.NAVI_BBPS_PAY_BILL_SCREEN.name, - initialSource = initialSource - ), - second = true - ) - ) - } else if (isRewardsAnimationExperimentationEnabled.value) { - _goToNextScreen.emit( - Pair( - BbpsPostPaymentScreenV2Destination( - billTransactionItemEntity = billTransactionItemEntity, - myBillEntity = myBillEntity, - isSourcePaymentSummary = true, - isRootScreen = isRootScreen, - orderReferenceId = orderReferenceId, - isDiwaliThemeEnabled = false, source = NaviBbpsScreen.NAVI_BBPS_PAY_BILL_SCREEN.name, initialSource = initialSource ), @@ -1164,13 +1142,5 @@ constructor( ?.isEnabled .orFalse() } - - _isDiwaliAnimationExperimentationEnabled.update { - litmusExperimentsUseCase - .execute(experimentName = LITMUS_EXPERIMENT_NAVIPAY_REWARD_DIWALI_ANIMATION) - ?.variant - ?.enabled - .orFalse() - } } } diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/transactiondetails/ui/BbpsPostPaymentScreenV2.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/transactiondetails/ui/BbpsPostPaymentScreenV2.kt index 156a02ddb7..d2d9a115b1 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/transactiondetails/ui/BbpsPostPaymentScreenV2.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/transactiondetails/ui/BbpsPostPaymentScreenV2.kt @@ -174,7 +174,6 @@ fun BbpsPostPaymentScreenV2( source: String, orderReferenceId: String, initialSource: String, - isDiwaliThemeEnabled: Boolean = false, naviBbpsAnalytics: NaviBbpsAnalytics.PostPaymentScreen = NaviBbpsAnalytics.INSTANCE.PostPaymentScreen() ) { @@ -480,7 +479,6 @@ fun BbpsPostPaymentScreenV2( scratchCardBottomMovementAnimationDuration = bbpsTransactionDetailsViewModel .scratchCardBottomMovementAnimationDuration, - isDiwaliThemeEnabled = isDiwaliThemeEnabled ) } } @@ -496,8 +494,7 @@ fun BbpsPostPaymentScreenV2( .scratchCardBottomMovementAnimationDuration, smallScratchCardOnLandVisibilityAnimationDuration = bbpsTransactionDetailsViewModel - .smallScratchCardOnLandVisibilityAnimationDuration, - isDiwaliThemeEnabled = isDiwaliThemeEnabled + .smallScratchCardOnLandVisibilityAnimationDuration ) } } @@ -541,8 +538,7 @@ fun SharedTransitionScope.RenderPostPaymentScreenV2( isRewardsEntryPointVisible: Boolean, scratchCardRotationAnimationDuration: Int, rewardsBottomStripeSectionAnimationDuration: Int, - scratchCardBottomMovementAnimationDuration: Int, - isDiwaliThemeEnabled: Boolean + scratchCardBottomMovementAnimationDuration: Int ) { val scrollState = rememberScrollState() @@ -670,8 +666,7 @@ fun SharedTransitionScope.RenderPostPaymentScreenV2( rewardsBottomStripeSectionAnimationDuration = rewardsBottomStripeSectionAnimationDuration, scratchCardBottomMovementAnimationDuration = - scratchCardBottomMovementAnimationDuration, - isDiwaliThemeEnable = isDiwaliThemeEnabled + scratchCardBottomMovementAnimationDuration ) } ) @@ -1082,8 +1077,7 @@ private fun SharedTransitionScope.BottomBarSection( isRewardsEntryPointVisible: Boolean, scratchCardRotationAnimationDuration: Int, rewardsBottomStripeSectionAnimationDuration: Int, - scratchCardBottomMovementAnimationDuration: Int, - isDiwaliThemeEnable: Boolean + scratchCardBottomMovementAnimationDuration: Int ) { Column(modifier = Modifier.padding(top = 16.dp)) { if (isRewardsEntryPointVisible) { @@ -1097,8 +1091,7 @@ private fun SharedTransitionScope.BottomBarSection( rewardsBottomStripeSectionAnimationDuration = rewardsBottomStripeSectionAnimationDuration, scratchCardBottomMovementAnimationDuration = - scratchCardBottomMovementAnimationDuration, - isDiwaliThemeEnable = isDiwaliThemeEnable + scratchCardBottomMovementAnimationDuration ) } Spacer(modifier = Modifier.height(16.dp)) @@ -1552,8 +1545,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection( animateContextScope: AnimatedContentScope, scratchCardSizeAnimationDuration: Int, scratchCardBottomMovementAnimationDuration: Int, - smallScratchCardOnLandVisibilityAnimationDuration: Int, - isDiwaliThemeEnabled: Boolean + smallScratchCardOnLandVisibilityAnimationDuration: Int ) { var isScratchCardFullyVisible by remember { mutableStateOf(false) } LaunchedEffect(Unit) { isScratchCardFullyVisible = true } @@ -1584,10 +1576,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection( horizontalAlignment = Alignment.CenterHorizontally ) { Image( - painter = - if (isDiwaliThemeEnabled) - painterResource(id = CommonR.drawable.ic_np_bbps_scratch_card_with_coin_diwali) - else painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin), + painter = painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin), contentDescription = "", modifier = Modifier.alpha(alpha) @@ -1866,8 +1855,7 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection( onRewardsCtaClicked: () -> Unit, scratchCardRotationAnimationDuration: Int, rewardsBottomStripeSectionAnimationDuration: Int, - scratchCardBottomMovementAnimationDuration: Int, - isDiwaliThemeEnable: Boolean + scratchCardBottomMovementAnimationDuration: Int ) { val colorStops = remember { arrayOf( @@ -1969,20 +1957,12 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection( ) ) { Image( - painter = - if (isDiwaliThemeEnable) - painterResource(id = CommonR.drawable.ic_np_bbps_scratch_stripe_diwali) - else painterResource(id = CommonR.drawable.ic_np_scratch_stripe), + painter = painterResource(id = CommonR.drawable.ic_np_scratch_stripe), contentDescription = EMPTY, ) } Image( - painter = - if (isDiwaliThemeEnable) - painterResource( - id = CommonR.drawable.ic_np_bbps_scratch_card_with_coin_diwali - ) - else painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin), + painter = painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin), contentDescription = EMPTY, modifier = Modifier.padding(start = 20.dp, bottom = 8.dp) diff --git a/android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_card_with_coin_diwali.xml b/android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_card_with_coin_diwali.xml deleted file mode 100644 index 8f4ca9ea4f..0000000000 --- a/android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_card_with_coin_diwali.xml +++ /dev/null @@ -1,1385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_stripe_diwali.xml b/android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_stripe_diwali.xml deleted file mode 100644 index 9d8bc94e8e..0000000000 --- a/android/navi-common/src/main/res/drawable/ic_np_bbps_scratch_stripe_diwali.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -