in some cases like updatePushToken we should use coroutines without ViewModel. and in this case required worked Dispatcher, but UIDispatcher is private in library.
i suggest add:
expect val Dispatchers.UI: CoroutineDispatcher
on android:
actual val Dispatchers.UI: CoroutineDispatcher get() = Dispatchers.Main
on ios:
actual val Dispatchers.UI: CoroutineDispatcher get() = UIDispatcher()
later, when coroutines multithreading will be released, we just deprecate Dispatchers.UI and on iOS pass Dispatchers.Main instead UIDispatcher
in some cases like
updatePushToken
we should use coroutines without ViewModel. and in this case required worked Dispatcher, but UIDispatcher is private in library. i suggest add:expect val Dispatchers.UI: CoroutineDispatcher
on android:
actual val Dispatchers.UI: CoroutineDispatcher get() = Dispatchers.Main
on ios:
actual val Dispatchers.UI: CoroutineDispatcher get() = UIDispatcher()
later, when coroutines multithreading will be released, we just deprecate
Dispatchers.UI
and on iOS pass Dispatchers.Main instead UIDispatcher