File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
kmp-observableviewmodel-core/src/appleMain/kotlin/com/rickclephas/kmp/observableviewmodel Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public actual fun <T> MutableStateFlow(
17
17
* A [MutableStateFlow] that triggers [ViewModelScopeImpl.sendObjectWillChange]
18
18
* and accounts for the [ViewModelScopeImpl.subscriptionCount].
19
19
*/
20
+ @OptIn(ExperimentalForInheritanceCoroutinesApi ::class )
20
21
private class MutableStateFlowImpl <T >(
21
22
private val viewModelScope : ViewModelScopeImpl ,
22
23
private val stateFlow : MutableStateFlow <T >
@@ -67,6 +68,7 @@ private class MutableStateFlowImpl<T>(
67
68
/* *
68
69
* A [StateFlow] that combines the subscription counts of a [ViewModelScopeImpl] and [StateFlow].
69
70
*/
71
+ @OptIn(ExperimentalForInheritanceCoroutinesApi ::class )
70
72
private class SubscriptionCountFlow (
71
73
private val viewModelScopeSubscriptionCount : StateFlow <Int >,
72
74
private val stateFlowSubscriptionCount : StateFlow <Int >
@@ -139,6 +141,7 @@ private fun <T> CoroutineScope.launchSharing(
139
141
* Similar to the kotlinx.coroutines implementation, used to return a read-only StateFlow with an optional Job.
140
142
* https://github.com/Kotlin/kotlinx.coroutines/blob/6dfabf763fe9fc91fbb73eb0f2d5b488f53043f1/kotlinx-coroutines-core/common/src/flow/operators/Share.kt#L379
141
143
*/
144
+ @OptIn(ExperimentalForInheritanceCoroutinesApi ::class )
142
145
private class ReadonlyStateFlow <T >(
143
146
flow : StateFlow <T >,
144
147
@Suppress(" unused" )
You can’t perform that action at this time.
0 commit comments