From 968a2cf6f3317b189d6b5ee1fa4e22f5ee098bd3 Mon Sep 17 00:00:00 2001 From: Divyesh Shinde Date: Tue, 22 Apr 2025 10:21:42 +0530 Subject: [PATCH] NTP-54510 | Divyesh | view-history-paid-bill-fix (#15865) --- .../com/navi/bbps/feature/paybill/PayBillViewModel.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt index eb006eb475..f770e687a5 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/paybill/PayBillViewModel.kt @@ -528,12 +528,16 @@ constructor( updateBillDetails() } - private suspend fun fetchMatchingBillAndUpdateEntity() { - val savedBill = findMatchingSavedBill() - updateMyBillEntity(myBillEntity = savedBill) + private fun fetchMatchingBillAndUpdateEntity() { + viewModelScope.launch(dispatcherProvider.io) { + val savedBill = findMatchingSavedBill() + updateMyBillEntity(myBillEntity = savedBill) + } } private fun updateBillDetails() { + fetchMatchingBillAndUpdateEntity() + billDetailsEntity.value?.let { updateBillAndAmountValues(billDetailsEntity = it) } billDetailsEntity.value?.let {