Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Commit 21e3083

Browse files
tedKim5178tiembo
authored andcommitted
minor code fix
remove redundant local variable
1 parent a4a7cd3 commit 21e3083

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/src/main/java/com/google/samples/apps/sunflower/utilities/InjectorUtils.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ object InjectorUtils {
4343
fun provideGardenPlantingListViewModelFactory(
4444
context: Context
4545
): GardenPlantingListViewModelFactory {
46-
val repository = getGardenPlantingRepository(context)
47-
return GardenPlantingListViewModelFactory(repository)
46+
return GardenPlantingListViewModelFactory(getGardenPlantingRepository(context))
4847
}
4948

5049
fun providePlantListViewModelFactory(fragment: Fragment): PlantListViewModelFactory {
51-
val repository = getPlantRepository(fragment.requireContext())
52-
return PlantListViewModelFactory(repository, fragment)
50+
return PlantListViewModelFactory(getPlantRepository(fragment.requireContext()), fragment)
5351
}
5452

5553
fun providePlantDetailViewModelFactory(

0 commit comments

Comments
 (0)