You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I miss combineLatest() which transformer behaves more like Flow.transform than Flow.map.
My usecase: I ('d like to) combine multiple flows and emit loading & success state between suspensions in trasformer:
val filter =ConflatedBroadcastChannel<Filter>()
val search =ConflatedBroadcastChannel<String>()
filter.asFlow().combineLatest(search.asFlow()) { f, s ->
emit(LoadingResource())
val data = fetchData(f, s) // suspending function
emit(SuccessResource(data))
}
I may rewrite it to do a transformation to Pair, however it seems quite unnecessary and personally I have use cases for 4 flows (E.g. I would have to create a data class each time).
I could try to prepare a PR.
(Also, I would do this myself but the building-blocks of combineLatest are internal. :X)
The text was updated successfully, but these errors were encountered:
* Operator renamed to combine
* Introduced combineTransform operator with custom transformer
* Decouple API and implementation details to improve user experience from IDE
* combine(Iterable<Flow>) and combineTransform(Iterable<Flow>) are introduced
Fixes#1224Fixes#1262
* Operator renamed to combine
* Introduced combineTransform operator with custom transformer
* Decouple API and implementation details to improve user experience from IDE
* combine(Iterable<Flow>) and combineTransform(Iterable<Flow>) are introduced
Fixes#1224Fixes#1262
* Operator renamed to combine
* Introduced combineTransform operator with custom transformer
* Decouple API and implementation details to improve user experience from IDE
* combine(Iterable<Flow>) and combineTransform(Iterable<Flow>) are introduced
Fixes#1224Fixes#1262
I miss
combineLatest()
which transformer behaves more like Flow.transform than Flow.map.My usecase: I ('d like to) combine multiple flows and emit loading & success state between suspensions in trasformer:
I may rewrite it to do a transformation to
Pair
, however it seems quite unnecessary and personally I have use cases for 4 flows (E.g. I would have to create a data class each time).I could try to prepare a PR.
(Also, I would do this myself but the building-blocks of combineLatest are internal. :X)
The text was updated successfully, but these errors were encountered: