mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Refactor: Inject BluetoothViewModel into ConnectionsScreen (#2228)
This commit is contained in:
parent
1d165a5dc3
commit
ca3c787e71
4 changed files with 29 additions and 17 deletions
|
|
@ -28,6 +28,7 @@ import androidx.navigation.compose.NavHost
|
|||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.geeksville.mesh.R
|
||||
import com.geeksville.mesh.model.BluetoothViewModel
|
||||
import com.geeksville.mesh.model.UIViewModel
|
||||
import com.geeksville.mesh.ui.TopLevelDestination.Companion.isTopLevel
|
||||
import com.geeksville.mesh.ui.debug.DebugScreen
|
||||
|
|
@ -74,6 +75,7 @@ fun NavDestination.showLongNameTitle(): Boolean {
|
|||
fun NavGraph(
|
||||
modifier: Modifier = Modifier,
|
||||
uIViewModel: UIViewModel = hiltViewModel(),
|
||||
bluetoothViewModel: BluetoothViewModel = hiltViewModel(),
|
||||
navController: NavHostController = rememberNavController(),
|
||||
) {
|
||||
NavHost(
|
||||
|
|
@ -89,7 +91,7 @@ fun NavGraph(
|
|||
nodesGraph(navController, uIViewModel,)
|
||||
mapGraph(navController, uIViewModel)
|
||||
channelsGraph(navController, uIViewModel)
|
||||
connectionsGraph(navController, uIViewModel)
|
||||
connectionsGraph(navController, uIViewModel, bluetoothViewModel)
|
||||
composable<Route.DebugPanel> { DebugScreen() }
|
||||
radioConfigGraph(navController, uIViewModel)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue