TP-41157 | select emi screen no api call when amount is not changed (#7850)
This commit is contained in:
committed by
GitHub
parent
891215ea3c
commit
6c29a8492b
@@ -289,9 +289,10 @@ class TitleWithInputFieldBottomSheet : BaseBottomSheet(), HLFooterListener {
|
||||
override fun onFooterCtaClick(ctaData: CtaData?) {
|
||||
val enteredAmount = binding.editText.plainTextInput.text
|
||||
if (enteredAmount.isNullOrEmpty()) return
|
||||
val preFilledAmount = bottomSheetData?.savedText ?: EMPTY
|
||||
val unformattedAmount = getUnformattedString(enteredAmount.toString())
|
||||
if (isValid(unformattedAmount.toInt())) {
|
||||
dataListener?.sendSelectedValueWithAction(unformattedAmount, DOWNPAYMENT_BOTTOM_SHEET)
|
||||
if (unformattedAmount != preFilledAmount) dataListener?.sendSelectedValueWithAction(unformattedAmount, DOWNPAYMENT_BOTTOM_SHEET)
|
||||
safelyDismissDialog()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,10 +112,13 @@ class TitleWithRangeSliderBottomSheet :
|
||||
binding.data?.action?.let { action ->
|
||||
if (action == 0) {
|
||||
val currentChosenValue = binding.rangeSliderView.seekbar.progress + minSliderValue
|
||||
dataListener?.sendSelectedValueWithAction(
|
||||
currentChosenValue.toString(),
|
||||
HOLIDAY_PERIOD_BOTTOM_SHEET
|
||||
)
|
||||
val preSelectedValue = binding.data?.selectedValue?.toInt() ?: 0
|
||||
if (currentChosenValue != preSelectedValue) {
|
||||
dataListener?.sendSelectedValueWithAction(
|
||||
currentChosenValue.toString(),
|
||||
HOLIDAY_PERIOD_BOTTOM_SHEET
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
safelyDismissDialog()
|
||||
|
||||
Reference in New Issue
Block a user