File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/app/src/main/java/com/couchbase/learningpath Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ fun InventoryNavGraph(
66
66
navController : NavHostController = rememberNavController(),
67
67
scaffoldState : ScaffoldState = rememberScaffoldState(),
68
68
scope : CoroutineScope = rememberCoroutineScope(),
69
+ userProfileViewModel : UserProfileViewModel ,
69
70
startDestination : String = MainDestinations .LOGIN_ROUTE ) {
70
71
val actions = remember(navController) { MainActions (navController) }
71
72
NavHost (navController = navController,
@@ -192,7 +193,7 @@ fun InventoryNavGraph(
192
193
UserProfileView (
193
194
openDrawer = openDrawer,
194
195
scaffoldState = scaffoldState,
195
- viewModel = getViewModel< UserProfileViewModel >() )
196
+ viewModel = userProfileViewModel )
196
197
}
197
198
198
199
composable(MainDestinations .DEVELOPER_ROUTE ){
Original file line number Diff line number Diff line change @@ -117,7 +117,8 @@ class MainActivity : ComponentActivity() {
117
117
openDrawer = { openDrawer() },
118
118
navController = navController,
119
119
scaffoldState = scaffoldState,
120
- scope = scope
120
+ scope = scope,
121
+ profileViewModel
121
122
)
122
123
}
123
124
}
You can’t perform that action at this time.
0 commit comments