Peko icon indicating copy to clipboard operation
Peko copied to clipboard

Provide a way to pass a custom CoroutineDispatcher to requestPermissionsAsync

Open Ornolfr opened this issue 6 years ago • 1 comments

Due to the issue in Dispatchers.Main described here https://github.com/Kotlin/kotlinx.coroutines/issues/878, using requestPermissionsAsync might block the main thread for a few hundred milliseconds causing a frame drop. It would make sense to be able to pass an optional CoroutineDispatcher to requestPermissionsAsync so that we can use self-made main dispatchers like here https://github.com/Kotlin/kotlinx.coroutines/issues/878#issuecomment-458658434.

Ornolfr avatar Jan 30 '19 08:01 Ornolfr

Yes, makes sense. Will add it in the next version. Thanks.

deva666 avatar Jan 30 '19 17:01 deva666