getBreedsFromCache().conflate() #172
Replies: 1 comment 1 reply
|
Hi Lena, sorry for not responding sooner. Still getting used to GH discussions. The current version no longer uses conflate, but it could. According to the docs:
If we were liking / unliking breeds, and producing new updated versions of the DB faster than we could collect them, At the time, I was collecting inside the repository layer (BreedModel), which requires a coroutine scope to launch. The pro was that it could expose only a single flow to the ViewModel. The con was that it required passing it a coroutine scope. The current strategy is to return 2 flows from the repository layer, and flattenMerge() them into 1 in the ViewModel here. |
Uh oh!
There was an error while loading. Please reload this page.
Hi Brady, could you please explain what is the purpose of conflate() in BreedModel getBreeds() in the last version of the project?
getBreedsFromCache().conflate().collect {
emit(it)
}
All reactions