android-components / mozilla.components.support.ktx.kotlinx.coroutines.flow / kotlinx.coroutines.flow.Flow

Extensions for kotlinx.coroutines.flow.Flow

Name Summary
ifAnyChanged fun <T, R> Flow<T>.ifAnyChanged(transform: (T) -> Array<R>): Flow<T>
Returns a Flow containing only values of the original Flow where the result array of calling transform contains at least one different value.
ifChanged fun <T> Flow<T>.ifChanged(): Flow<T>
Returns a Flow containing only values of the original Flow that have changed compared to the value emitted before them.fun <T, R> Flow<T>.ifChanged(transform: (T) -> R): Flow<T>
Returns a Flow containing only values of the original Flow where the result of calling transform has changed from the result of the previous value.