File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
androidApp/src/main/java/com/example/fruitties/android/ui Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ fun FruittieScreen(
38
38
fruittieId : Long ,
39
39
onNavBarBack : () -> Unit ,
40
40
viewModel : FruittieViewModel = viewModel(
41
+ key = "fruittie_$fruittieId",
41
42
factory = LocalAppContainer .current.fruittieViewModelFactory,
42
43
extras = creationExtras {
43
44
set(FRUITTIE_ID_KEY , fruittieId)
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ struct FruittieScreen: View {
27
27
let fruittieViewModel : FruittieViewModel =
28
28
viewModelStoreOwner. viewModel (
29
29
factory: appContainer. value. fruittieViewModelFactory,
30
+ key: " fruittie_ \( fruittie. id) " ,
30
31
extras: creationExtras { extras in
31
32
extras. set (
32
33
key: FruittieViewModel . companion. FRUITTIE_ID_KEY,
You can’t perform that action at this time.
0 commit comments