From d559348f8e387fe374ccbc15b333423c31b68c0d Mon Sep 17 00:00:00 2001 From: Divyesh Shinde Date: Fri, 11 Apr 2025 20:34:13 +0530 Subject: [PATCH] =?UTF-8?q?NTP-54510=20|=20Divyesh=20|=20add=20no=20intern?= =?UTF-8?q?et=20handling=20on=20landing=20page=20empty=20=E2=80=A6=20(#157?= =?UTF-8?q?72)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../navi/bbps/feature/category/BillCategoriesViewModel.kt | 8 ++++++-- .../navi/bbps/feature/category/BillCategoryViewModelV2.kt | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt index d1d098437f..44b2e73c89 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt @@ -666,13 +666,17 @@ constructor( ) } catch (e: Exception) { updateBillCategoriesState(BillCategoryState.Error) - notifyError() + notifyError(errorConfig = getGenericErrorConfig()) e.log() } } ?: run { updateBillCategoriesState(BillCategoryState.Error) - notifyError() + if (!naviNetworkConnectivity.isInternetConnected()) { + notifyError(errorConfig = getNoInternetErrorConfig()) + } else { + notifyError(errorConfig = getGenericErrorConfig()) + } } } } diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoryViewModelV2.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoryViewModelV2.kt index 61316b783e..9407a4ba7f 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoryViewModelV2.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoryViewModelV2.kt @@ -266,7 +266,11 @@ constructor( } } else if (_billCategoriesStateV2.value !is BillCategoryStateV2.Loaded) { _billCategoriesStateV2.update { BillCategoryStateV2.Error } - notifyError() + if (!naviNetworkConnectivity.isInternetConnected()) { + notifyError(errorConfig = getNoInternetErrorConfig()) + } else { + notifyError(errorConfig = getGenericErrorConfig()) + } } } }