Skip to content
Snippets Groups Projects
Verified Commit 02289a9c authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: correct another issue with state holder api

parent 9dfba487
No related branches found
No related tags found
No related merge requests found
......@@ -22,4 +22,7 @@ inline fun <T> Flow<StateHolder<T>?>.flatMap(): Flow<T?> =
@ExperimentalCoroutinesApi
inline fun <reified T> Flow<Iterable<StateHolder<T>>?>.combineLatest(): Flow<List<T>> =
flatMapLatest { combine(it?.map(StateHolder<T>::flow).orEmpty(), ::listOf) }
flatMapLatest {
if (it != null) combine(it.map(StateHolder<T>::flow), ::listOf)
else flowOf(emptyList())
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment