fix compilation warning
This commit is contained in:
parent
f81de7bd4f
commit
1b4c79d9ff
1 changed files with 2 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
package io.element.android.libraries.core.coroutine
|
package io.element.android.libraries.core.coroutine
|
||||||
|
|
||||||
|
import kotlinx.coroutines.ExperimentalForInheritanceCoroutinesApi
|
||||||
import kotlinx.coroutines.coroutineScope
|
import kotlinx.coroutines.coroutineScope
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.FlowCollector
|
import kotlinx.coroutines.flow.FlowCollector
|
||||||
|
|
@ -19,6 +20,7 @@ import kotlinx.coroutines.flow.stateIn
|
||||||
* A [StateFlow] that derives its value from a [Flow].
|
* A [StateFlow] that derives its value from a [Flow].
|
||||||
* Useful when you want to apply transformations to a [Flow] and expose it as a [StateFlow].
|
* Useful when you want to apply transformations to a [Flow] and expose it as a [StateFlow].
|
||||||
*/
|
*/
|
||||||
|
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
|
||||||
class DerivedStateFlow<T>(
|
class DerivedStateFlow<T>(
|
||||||
private val getValue: () -> T,
|
private val getValue: () -> T,
|
||||||
private val flow: Flow<T>
|
private val flow: Flow<T>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue