TP-72876 | TH closes when filters are opened & lite done button fix (#11731)

This commit is contained in:
Shaurya Rehan
2024-07-05 17:55:56 +05:30
committed by GitHub
parent 67a9bba5aa
commit dd0e9b24e7
3 changed files with 14 additions and 9 deletions

View File

@@ -177,7 +177,8 @@ fun UPILiteSection(
val ctaButtonEnabled by remember {
derivedStateOf {
if (isDelayedOnboardingExperimentEnabled)
!enableButtonLottie && enteredAmount.isAmountValid() && !isInvalidAmount
!enableButtonLottie && enteredAmount.isAmountValid() && !isInvalidAmount ||
(mainCtaState !is UPILiteMainCtaState.AddBalance)
else
(mainCtaState !is UPILiteMainCtaState.AddBalance) ||
isCtaButtonActiveAndBottomSheetDismissbale

View File

@@ -479,7 +479,6 @@ constructor(
init {
fetchNaviPayUPILiteConfig()
updatenaviPaySessionAttributes()
updateLiteAccountBalanceIfPresentInPref()
getActiveLiteAccountInfoFromSharedPref()
setLitmusExperimentValues()
}
@@ -814,15 +813,17 @@ constructor(
return getCustomerStatus() == NaviPayCustomerStatus.LINKED_VPA
}
private fun updateLiteAccountBalanceIfPresentInPref() {
private fun updateLiteAccountBalanceIfPresentInPref(shouldAutoInitTopUp: Boolean) {
val balanceFromSharedPref = activeLiteAccountInfoFromSharedPref.balance
if (balanceFromSharedPref.isNotEmpty()) {
if (activeLiteAccountInfoFromSharedPref.isClBound) {
updateIsUserOnboarded(isUserOnboarded = true)
updateUPILiteBalance(balance = balanceFromSharedPref)
updateEnteredAmount(
amount = getPreFilledTopUpAmount(balance = balanceFromSharedPref)
)
if (!shouldAutoInitTopUp) {
updateEnteredAmount(
amount = getPreFilledTopUpAmount(balance = balanceFromSharedPref)
)
}
}
if (
@@ -857,7 +858,9 @@ constructor(
isActiveLiteAccountPresent && balanceFromSharedPref.isEmpty()
)
updateBankAccountState(bankAccountsState = BankAccountsState.Loading)
updateLiteAccountBalanceIfPresentInPref()
updateLiteAccountBalanceIfPresentInPref(
shouldAutoInitTopUp = shouldAutoInitTopUp
)
updateLinkedAccountInfoWithActiveLiteAccount()
fireUpiLiteScreenLandEvent(
isActiveLiteAccountPresent = isActiveLiteAccountPresent

View File

@@ -211,7 +211,9 @@ fun TransactionHistoryScreen(
}
val onBackClick = {
if (
if (bottomSheetState.isVisible) {
closeSheet()
} else if (
payeeTransactionHistoryEntity?.isPayeeLevelTransactionHistory == true ||
!naviPayActivity.needsResult
) {
@@ -219,7 +221,6 @@ fun TransactionHistoryScreen(
} else {
naviPayActivity.finish()
}
Unit
}
BackHandler { onBackClick() }