diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/BackButtonHandler.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/BackButtonHandler.kt index 5e1079aca0..5e178601b1 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/BackButtonHandler.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/BackButtonHandler.kt @@ -14,6 +14,7 @@ import com.navi.base.deeplink.DeepLinkManager import com.navi.base.deeplink.util.DeeplinkConstants import com.navi.base.model.CtaData import com.navi.bbps.common.model.view.BbpsErrorVisibilityEvent +import com.navi.bbps.compose.destinations.BbpsRoutingLauncherScreenDestination import com.navi.bbps.compose.destinations.BillCategoriesScreenV2Destination import kotlinx.coroutines.launch @@ -44,10 +45,10 @@ internal interface BackButtonHandler { private fun NaviBbpsActivity.isBackPressedOnBbpsRootScreen(): Boolean { return isNaviControllerInitialized && - (navController.currentBackStackEntry?.destination?.route == - BillCategoriesScreenV2Destination.route || - navController.currentBackStackEntry?.destination?.route == - BillCategoriesScreenV2Destination.route) + navController.currentBackStackEntry?.destination?.route?.let { currentRoute -> + currentRoute == BillCategoriesScreenV2Destination.route || + currentRoute == BbpsRoutingLauncherScreenDestination.route + } ?: false } private fun NaviBbpsActivity.dismissErrorSheet() {