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

feat: correct issue with state holder api

parent e89b04e2
No related branches found
No related tags found
No related merge requests found
......@@ -15,4 +15,4 @@ plugins {
}
group = "de.justjanne.libquassel"
version = "0.8.0"
version = "0.8.1"
......@@ -12,13 +12,13 @@ package de.justjanne.libquassel.protocol.util
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.emptyFlow
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
@ExperimentalCoroutinesApi
@Suppress("NOTHING_TO_INLINE")
inline fun <T> Flow<StateHolder<T>?>.flatMap(): Flow<T?> =
flatMapLatest { it?.flow() ?: emptyFlow() }
flatMapLatest { it?.flow() ?: flowOf(null) }
@ExperimentalCoroutinesApi
inline fun <reified T> Flow<Iterable<StateHolder<T>>?>.combineLatest(): Flow<List<T>> =
......
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