dave08
12/15/2019, 4:22 PMdave08
12/15/2019, 4:47 PMtoList().all { it == ActionStatus.SUCCESS } ... 🙃tseisel
12/15/2019, 5:11 PMFlow.all this way:
suspend inline fun <T> Flow<T>.all(crossinline predicate: (T) -> Boolean): Boolean =
fold(true) { result, element -> result && predicate(element) }dave08
12/15/2019, 5:18 PMacc only... was that my mistake?tseisel
12/15/2019, 5:25 PMfalse as the initial value, so that acc is always false even if value == ActionStatus.SUCCESS
Replacing fold(false) with fold(true) in your code should work