Skip to content

Commit 5311fb9

Browse files
authored
Merge pull request #81 from rickclephas/feature/coroutines-1.9.0
kotlinx.coroutines 1.9.0
2 parents 32be3e9 + 873bdd0 commit 5311fb9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22
kotlin = "2.0.20"
3-
kotlinx-coroutines = "1.8.1"
3+
kotlinx-coroutines = "1.9.0"
44
android = "8.2.0"
55
androidx-lifecycle = "2.8.4"
66
atomicfu = "0.24.0"

kmp-observableviewmodel-core/src/appleMain/kotlin/com/rickclephas/kmp/observableviewmodel/StateFlow.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public actual fun <T> MutableStateFlow(
1717
* A [MutableStateFlow] that triggers [ViewModelScopeImpl.sendObjectWillChange]
1818
* and accounts for the [ViewModelScopeImpl.subscriptionCount].
1919
*/
20+
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
2021
private class MutableStateFlowImpl<T>(
2122
private val viewModelScope: ViewModelScopeImpl,
2223
private val stateFlow: MutableStateFlow<T>
@@ -67,6 +68,7 @@ private class MutableStateFlowImpl<T>(
6768
/**
6869
* A [StateFlow] that combines the subscription counts of a [ViewModelScopeImpl] and [StateFlow].
6970
*/
71+
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
7072
private class SubscriptionCountFlow(
7173
private val viewModelScopeSubscriptionCount: StateFlow<Int>,
7274
private val stateFlowSubscriptionCount: StateFlow<Int>
@@ -139,6 +141,7 @@ private fun <T> CoroutineScope.launchSharing(
139141
* Similar to the kotlinx.coroutines implementation, used to return a read-only StateFlow with an optional Job.
140142
* https://github.com/Kotlin/kotlinx.coroutines/blob/6dfabf763fe9fc91fbb73eb0f2d5b488f53043f1/kotlinx-coroutines-core/common/src/flow/operators/Share.kt#L379
141143
*/
144+
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
142145
private class ReadonlyStateFlow<T>(
143146
flow: StateFlow<T>,
144147
@Suppress("unused")

0 commit comments

Comments
 (0)