distinctUntilChangedBy

fun <T, K> Flow<T>.distinctUntilChangedBy(keySelector: (T) -> K): Flow<T>

Returns flow where all subsequent repetitions of the same key are filtered out, where key is extracted with keySelector function.

Note that repeated application of distinctUntilChanged operator with the same parameter has no effect.

Sources

common source
Link copied to clipboard