TP-83752 | Re-add hide balance action (#12534)
This commit is contained in:
@@ -47,6 +47,7 @@ fun InitLifecycleListener(
|
||||
}
|
||||
Lifecycle.Event.ON_RESUME -> {
|
||||
if (homeVM.shouldMakeAPICall()) {
|
||||
homeVM.triggerHideBalanceAction()
|
||||
callBackToActivityScreen.invoke(
|
||||
HomeScreenCallbackListener.ApiCallingWithCondition
|
||||
)
|
||||
|
||||
@@ -413,6 +413,35 @@ constructor(
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: Remove once delayed onboarding goes 100%
|
||||
fun triggerHideBalanceAction() {
|
||||
val hideBalanceActionData =
|
||||
UiTronActionData(
|
||||
actions =
|
||||
listOf(
|
||||
UpdateViewStateAction(
|
||||
viewStates =
|
||||
mapOf(
|
||||
Constants.CHECK_BALANCE_ROW to Constants.VISIBLE,
|
||||
Constants.HIDE_BALANCE_ROW to Constants.INVISIBLE,
|
||||
Constants.CHECK_BALANCE_CLICK to Constants.VISIBLE,
|
||||
Constants.HIDE_BALANCE_CLICK to Constants.INVISIBLE
|
||||
)
|
||||
),
|
||||
UpdateDataAction(
|
||||
viewDataList =
|
||||
listOf(
|
||||
UpdateDataAction.ViewData(
|
||||
layoutId = Constants.BALANCE_TEXT,
|
||||
data = TextData(text = Constants.BALANCE_TEXT_MASKED_VALUE)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
handleActions(hideBalanceActionData)
|
||||
}
|
||||
|
||||
fun fetchHomeItems(
|
||||
showLoader: Boolean = true,
|
||||
density: String? = null,
|
||||
|
||||
@@ -486,6 +486,14 @@ object Constants {
|
||||
const val LOTTIE_LOADER_URL =
|
||||
"https://public-assets.prod.navi-sa.in/home_uitron/cta_loader.json"
|
||||
|
||||
// TODO: Remove these constants once delayed onboarding goes 100%
|
||||
const val CHECK_BALANCE_ROW = "checkBalanceRow"
|
||||
const val HIDE_BALANCE_ROW = "hideBalanceRow"
|
||||
const val CHECK_BALANCE_CLICK = "checkBalanceClick"
|
||||
const val HIDE_BALANCE_CLICK = "hideBalanceClick"
|
||||
const val BALANCE_TEXT = "balanceText"
|
||||
const val BALANCE_TEXT_MASKED_VALUE = "₹ * * * * *"
|
||||
|
||||
// Constants for Animation label
|
||||
object AnimationLabels {
|
||||
const val PROFILE_ANIMATION = "PROFILE_ANIMATION"
|
||||
|
||||
Reference in New Issue
Block a user