From e3a31e5c3b1a0b5c89e4d1b911d33ac8ab5c47f8 Mon Sep 17 00:00:00 2001 From: abdulsalam-j Date: Sat, 13 Jan 2024 22:58:52 +0300 Subject: [PATCH] feat: Make main dispatcher immediate for better UI performance --- .../kotlin/dev/icerock/moko/mvvm/internal/createUIDispatcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mvvm-internal/src/commonMain/kotlin/dev/icerock/moko/mvvm/internal/createUIDispatcher.kt b/mvvm-internal/src/commonMain/kotlin/dev/icerock/moko/mvvm/internal/createUIDispatcher.kt index 101cb1aa..b22b7dda 100644 --- a/mvvm-internal/src/commonMain/kotlin/dev/icerock/moko/mvvm/internal/createUIDispatcher.kt +++ b/mvvm-internal/src/commonMain/kotlin/dev/icerock/moko/mvvm/internal/createUIDispatcher.kt @@ -10,4 +10,4 @@ import kotlinx.coroutines.Dispatchers /** * We use coroutines native-mt version, so we can use Main dispatcher on both platforms */ -fun createUIDispatcher(): CoroutineDispatcher = Dispatchers.Main +fun createUIDispatcher(): CoroutineDispatcher = Dispatchers.Main.immediate