From 1b4c79d9ffaa20012758579002abc8619bc3a6fc Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 15 Oct 2024 00:22:30 +0200 Subject: [PATCH] fix compilation warning --- .../android/libraries/core/coroutine/DerivedStateFlow.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/core/src/main/kotlin/io/element/android/libraries/core/coroutine/DerivedStateFlow.kt b/libraries/core/src/main/kotlin/io/element/android/libraries/core/coroutine/DerivedStateFlow.kt index 68748ecdb5..a54d0eb9d8 100644 --- a/libraries/core/src/main/kotlin/io/element/android/libraries/core/coroutine/DerivedStateFlow.kt +++ b/libraries/core/src/main/kotlin/io/element/android/libraries/core/coroutine/DerivedStateFlow.kt @@ -7,6 +7,7 @@ package io.element.android.libraries.core.coroutine +import kotlinx.coroutines.ExperimentalForInheritanceCoroutinesApi import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.FlowCollector @@ -19,6 +20,7 @@ import kotlinx.coroutines.flow.stateIn * 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]. */ +@OptIn(ExperimentalForInheritanceCoroutinesApi::class) class DerivedStateFlow( private val getValue: () -> T, private val flow: Flow