Fix share channels crash (#3401)

This commit is contained in:
Phil Oliver 2025-10-08 12:23:45 -04:00 committed by GitHub
parent bb72cd7b8c
commit e6c8a2fc21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 30 deletions

View file

@ -53,8 +53,8 @@ private fun NavGraphBuilder.configRoutes(navController: NavHostController) {
composable(configRoute.route::class) { backStackEntry ->
val parentEntry = remember(backStackEntry) { navController.getBackStackEntry(ChannelsRoutes.ChannelsGraph) }
when (configRoute) {
ConfigRoute.CHANNELS -> ChannelConfigScreen(hiltViewModel(parentEntry))
ConfigRoute.LORA -> LoRaConfigScreen(hiltViewModel(parentEntry))
ConfigRoute.CHANNELS -> ChannelConfigScreen(navController, hiltViewModel(parentEntry))
ConfigRoute.LORA -> LoRaConfigScreen(navController, hiltViewModel(parentEntry))
else -> Unit // Should not happen if ConfigRoute enum is exhaustive for this context
}
}