codelab-kotlin-coroutines icon indicating copy to clipboard operation
codelab-kotlin-coroutines copied to clipboard

Advanced: PlantRepository.tryUpdateRecentPlantsForGrowZoneCache is initially unused

Open omaksymov opened this issue 4 years ago • 0 comments
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)) }
    }

omaksymov avatar May 24 '21 10:05 omaksymov