TP-62431 | Bugfixes (#10751)

This commit is contained in:
Sangaraboina Rishvik Vardhan
2024-05-08 17:16:15 +05:30
committed by GitHub
parent aef3febe1d
commit ff42856aff
5 changed files with 12 additions and 16 deletions

View File

@@ -72,7 +72,7 @@ class InsuranceContainerActivity : GiBaseActivity(), PaymentStatusBottomSheetLis
val paymentCta = viewModel.paymentRetryCta.value
val amountToPay =
(paymentCta?.parameters?.find { item -> item.key == AMOUNT }?.value?:data?.getStringExtra(AMOUNT))?.toDoubleWithSafe()
paymentCta?.parameters?.find { item -> item.key == AMOUNT }?.value?.toDoubleWithSafe() ?: data?.getDoubleExtra(AMOUNT, 0.0)
if (resultCode == RESULT_OK) {
// Payment success, close activity
finish()
@@ -206,7 +206,7 @@ class InsuranceContainerActivity : GiBaseActivity(), PaymentStatusBottomSheetLis
val paymentCta = viewModel.paymentRetryCta.value
val amountToPay =
(paymentCta?.parameters?.find { item -> item.key == AMOUNT }?.value?:bundle?.getString(AMOUNT))?.toDoubleWithSafe()
paymentCta?.parameters?.find { item -> item.key == AMOUNT }?.value?.toDoubleWithSafe() ?: bundle?.getDouble(AMOUNT, 0.0)
if (resultCode == RESULT_OK) {
// Payment success, close activity
finish()

View File

@@ -33,6 +33,7 @@ import com.navi.insurance.util.Constants.IS_AUTOPAY
import com.navi.insurance.util.Constants.IS_INSTALMENT
import com.navi.insurance.util.Constants.KEY_CTA_DATA
import com.navi.insurance.util.Constants.PAYMENTS_STATUS_IS_USER_CANCELLED_EXTRA
import com.navi.insurance.util.Constants.POLL
import com.navi.insurance.util.FAILURE
import com.navi.insurance.util.PAYMENT_FLOW_IDENTIFIER
import com.navi.insurance.util.PAYMENT_ORDER_DETAIL
@@ -105,7 +106,7 @@ class PaymentStatusActivity : GiBaseActivity() {
setPaymentResult(Activity.RESULT_OK, ctaData = it.data.redirectionCta)
}
}
FAILURE -> {
FAILURE, POLL -> {
setPaymentResult(Activity.RESULT_CANCELED, false, it.data.fallbackCta)
}
}

View File

@@ -119,7 +119,13 @@ class PolicyBenefitsFragment : BaseFragment(), WidgetCallback, View.OnClickListe
POLICY_ID_EXTRA -> policyId = lineItem.value ?: ""
}
}
}
} ?: let{
quoteId = arguments?.getString(QUOTE_ID_EXTRA)
planId = arguments?.getString(PLAN_ID_EXTRA)
tabId = arguments?.getString(TAB_ID_EXTRA)
benefitsType = arguments?.getString(BENEFITS_TYPE_EXTRA)
policyId = arguments?.getString(POLICY_ID_EXTRA)
}
benefitsType = arguments?.getString(BENEFITS_TYPE_EXTRA)
policyId = arguments?.getString(POLICY_ID_EXTRA)
if(tabId.isNullOrEmpty()) tabId = arguments?.getString(TAB_ID_EXTRA)

View File

@@ -325,6 +325,7 @@ object Constants {
const val WIDGET_POSITION = "widgetPosition"
const val UPDATED_WIDGET_DATA = "updatedWidgetData"
const val FILE_NAME = "fileName"
const val POLL = "POLL"
// This is required for animating a component for Health risk score
val numberConstant: List<String> =

View File

@@ -81,17 +81,5 @@
app:layout_constraintRight_toLeftOf="@id/share_btn"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/toolbar_divider"
android:visibility="visible"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="0dp"
android:background="#dfdfdf"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>