Workaround SlotTable modification race

This commit is contained in:
GG Bond authored and Vladimir Dostoyevskiy committed 2024-02-21 20:09:36 +08:00
1 parent 2734de0588
commit c2fa32f430
1 file changed
+5
@@ -74,6 +74,7 @@ import com.jamal.composeprefs3.ui.ifNotNullThen
import com.jamal.composeprefs3.ui.ifTrueThen
import kotlin.coroutines.resume
import kotlinx.coroutines.CancellableContinuation
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
@@ -108,6 +109,10 @@ class DialogState {
}
}
content = { block(realContinuation) }
}.also {
// Workaround SlotTable modification race
// IssueTracker: https://issuetracker.google.com/issues/325502738
delay(100)
}
suspend fun <R> awaitResult(