-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to Kotlin 2.0 but not change other dependencies. Tested with iOS and Anroid clients.
- Loading branch information
Showing
8 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
revolver/src/iosMain/kotlin/com/umain/revolver/flow/CStateFlow.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
package com.umain.revolver.flow | ||
|
||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.flow.FlowCollector | ||
import kotlinx.coroutines.flow.StateFlow | ||
|
||
actual open class CStateFlow<out T : Any> actual constructor( | ||
private val flow: StateFlow<T>, | ||
private val coroutineScope: CoroutineScope, | ||
) : CSharedFlow<T>(flow,coroutineScope), StateFlow<T> { | ||
override val value: T get() = flow.value | ||
actual override val value: T get() = flow.value | ||
|
||
actual override val replayCache: List<T> | ||
get() = super.replayCache | ||
|
||
actual override suspend fun collect(collector: FlowCollector<T>): Nothing { | ||
super.collect(collector) | ||
} | ||
} |