Merge pull request #2089 from medici/preEligibilityTimeoutHandling

Generate offer if pre-eligibility retry timeouts
This commit is contained in:
rahul bhat
2021-12-28 17:01:14 +05:30
committed by GitHub Enterprise
2 changed files with 10 additions and 1 deletions

View File

@@ -762,6 +762,8 @@ class NaviAnalytics private constructor() {
fun onOfferIdSuccess() = NaviTrackEvent.trackEventOnClickStream("offer_id_success")
fun onOfferReceived() = NaviTrackEvent.trackEventOnClickStream("offer_received")
fun onPreEligibilityRetryTimeout() =
NaviTrackEvent.trackEventOnClickStream("pre_eligibility_retry_timeout")
}
inner class Common {

View File

@@ -336,7 +336,14 @@ class LoanEligibilityLoaderActivity : BaseActivity(),
ApiPollScheduler(numberOfRetry = uploadDataAsyncResponse.requestConfig?.numOfRetries.orValue(
NUMBER_OF_RETRY
),
doOnTimeout = { runOnUiThread { handleTimeOutError() } }) {
doOnTimeout = {
if (type == PRE_ELIGIBILITY) {
analyticsEventTracker.onPreEligibilityRetryTimeout()
loanDetailsVM.generateOffer(loanOfferType)
} else {
runOnUiThread { handleTimeOutError() }
}
}) {
loanDetailsVM.checkApiPollStatus(uploadDataAsyncResponse.requestId.orEmpty(), type)
}
apiPollScheduler?.scheduleApiPoll()