NTP-8514 | Bug/bbps back handling (#16712)

This commit is contained in:
Sidharth Bamba
2025-06-24 17:50:33 +05:30
committed by GitHub
parent 0c8e9cb08c
commit 6901ac3999

View File

@@ -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() {