diff --git a/dependencies.gradle b/dependencies.gradle index e35d4058f..b7f6f5851 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -37,7 +37,7 @@ ext.libraries = [ kotlinStdlibJs : "org.jetbrains.kotlin:kotlin-stdlib-js:$versions.kotlin", timber : "com.jakewharton.timber:timber:$versions.timber", coroutines : "org.jetbrains.kotlinx:kotlinx-coroutines-core:$versions.coroutines", - coroutinesNativeMT: "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}-native-mt", + coroutinesNativeMT: "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}", rxJava : "io.reactivex.rxjava2:rxjava:$versions.rxJava", rxAndroid : "io.reactivex.rxjava2:rxandroid:$versions.rxAndroid", flMadStateMachine : "com.freeletics.mad:state-machine:0.3.0-alpha26", diff --git a/sample/ios/ios.xcworkspace/xcuserdata/hannes.xcuserdatad/UserInterfaceState.xcuserstate b/sample/ios/ios.xcworkspace/xcuserdata/hannes.xcuserdatad/UserInterfaceState.xcuserstate index 894d9f14e..73868d9fe 100644 Binary files a/sample/ios/ios.xcworkspace/xcuserdata/hannes.xcuserdatad/UserInterfaceState.xcuserstate and b/sample/ios/ios.xcworkspace/xcuserdata/hannes.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/sample/shared_code/src/iOSMain/kotlin/com/freeletics/flowredux/sample/NsQueueDispatcher.kt b/sample/shared_code/src/iOSMain/kotlin/com/freeletics/flowredux/sample/NsQueueDispatcher.kt index f619d7bd5..e0525ea7c 100644 --- a/sample/shared_code/src/iOSMain/kotlin/com/freeletics/flowredux/sample/NsQueueDispatcher.kt +++ b/sample/shared_code/src/iOSMain/kotlin/com/freeletics/flowredux/sample/NsQueueDispatcher.kt @@ -1,20 +1,10 @@ package com.freeletics.flowredux.sample -import platform.darwin.dispatch_async -import platform.darwin.dispatch_get_main_queue -import platform.darwin.dispatch_after -import platform.darwin.DISPATCH_TIME_NOW -import platform.darwin.dispatch_time -import platform.darwin.dispatch_queue_t +import kotlinx.coroutines.* +import platform.darwin.* import kotlin.coroutines.CoroutineContext -import kotlinx.coroutines.CoroutineDispatcher -import kotlinx.coroutines.CancellableContinuation -import kotlinx.coroutines.Delay -import kotlinx.coroutines.DisposableHandle -import kotlinx.coroutines.InternalCoroutinesApi -import kotlinx.coroutines.Runnable -@UseExperimental(InternalCoroutinesApi::class) +@OptIn(InternalCoroutinesApi::class) val applicationNsQueueDispatcher: CoroutineDispatcher = NsQueueDispatcher(dispatch_get_main_queue()) @InternalCoroutinesApi @@ -26,7 +16,6 @@ internal class NsQueueDispatcher(private val dispatchQueue: dispatch_queue_t) : } } - @InternalCoroutinesApi override fun scheduleResumeAfterDelay(timeMillis: Long, continuation: CancellableContinuation) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, timeMillis * 1_000_000), dispatchQueue) { try { @@ -39,7 +28,6 @@ internal class NsQueueDispatcher(private val dispatchQueue: dispatch_queue_t) : } } - @InternalCoroutinesApi override fun invokeOnTimeout(timeMillis: Long, block: Runnable, context: CoroutineContext): DisposableHandle { val handle = object : DisposableHandle { var disposed = false