myanmarking
10/01/2019, 10:57 AMgsala
10/01/2019, 11:05 AMcombineLatest
is only in the API to help migrate from RxJava and others. Just like a lot of other operators.
Take a look at https://github.com/Kotlin/kotlinx.coroutines/blob/a70022d6e7d9aa5d8fe27a2c46e987a2e8b85c21/kotlinx-coroutines-core/common/src/flow/Migration.kt
In this case the doc says to replace combineLatest
with combine
myanmarking
10/01/2019, 11:08 AMgsala
10/01/2019, 11:09 AMpublic inline fun <T1, T2, T3, T4, T5, R> Flow<T1>.combineLatest(
other: Flow<T2>,
other2: Flow<T3>,
other3: Flow<T4>,
other4: Flow<T5>,
crossinline transform: suspend (T1, T2, T3, T4, T5) -> R
): Flow<R> = combine(this, other, other2, other3, other4, transform)
I think 5 is the max you can combine with the built-in operator?myanmarking
10/01/2019, 11:09 AMgsala
10/01/2019, 11:10 AMmyanmarking
10/01/2019, 11:11 AM