codelab-kotlin-coroutines
codelab-kotlin-coroutines copied to clipboard
Advanced: PlantRepository.tryUpdateRecentPlantsForGrowZoneCache is initially unused
trafficstars
In Advanced Coroutines codelab "start" version of the codebase contains unused tryUpdateRecentPlantsForGrowZoneCache method in PlantRepository.
According to Step 12, it is supposed to be used inside PlantListViewModel.setGrowZoneNumber:
instead of
fun setGrowZoneNumber(num: Int) {
//...
// initial code version, will move during flow rewrite
launchDataLoad { plantRepository.tryUpdateRecentPlantsCache() }
}
should be
fun setGrowZoneNumber(num: Int) {
//...
// initial code version, will move during flow rewrite
launchDataLoad { plantRepository.tryUpdateRecentPlantsForGrowZoneCache(GrowZone(num)) }
}