summaryrefslogtreecommitdiff
path: root/sw-ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'sw-ui/src')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt11
-rw-r--r--sw-ui/src/test/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFrameworkTest.kt2
2 files changed, 3 insertions, 10 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt
index 0a2d7fa5..cb15460d 100644
--- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt
+++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFramework.kt
@@ -1,19 +1,14 @@
package org.luxons.sevenwonders.ui.redux.sagas
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.FlowPreview
-import kotlinx.coroutines.GlobalScope
-import kotlinx.coroutines.Job
+import kotlinx.coroutines.*
import kotlinx.coroutines.channels.BroadcastChannel
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
-import kotlinx.coroutines.launch
import redux.Middleware
import redux.MiddlewareApi
import redux.RAction
-@OptIn(ExperimentalCoroutinesApi::class)
+@OptIn(ExperimentalCoroutinesApi::class) // for BroadcastChannel
class SagaManager<S, A : RAction, R>(
private val monitor: ((A) -> Unit)? = null,
) {
@@ -62,7 +57,7 @@ class SagaManager<S, A : RAction, R>(
}
}
-@OptIn(FlowPreview::class, ExperimentalCoroutinesApi::class)
+@OptIn(ExperimentalCoroutinesApi::class) // for BroadcastChannel
class SagaContext<S, A : RAction, R>(
private val reduxApi: MiddlewareApi<S, A, R>,
private val actions: BroadcastChannel<A>,
diff --git a/sw-ui/src/test/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFrameworkTest.kt b/sw-ui/src/test/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFrameworkTest.kt
index f580fc93..044ba1ef 100644
--- a/sw-ui/src/test/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFrameworkTest.kt
+++ b/sw-ui/src/test/kotlin/org/luxons/sevenwonders/ui/redux/sagas/SagasFrameworkTest.kt
@@ -1,6 +1,5 @@
package org.luxons.sevenwonders.ui.redux.sagas
-import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.promise
@@ -39,7 +38,6 @@ private data class TestRedux(
val sagas: SagaManager<State, RAction, WrapperAction>,
)
-@OptIn(ExperimentalCoroutinesApi::class)
class SagaContextTest {
@Test
bgstack15