MohamedRejeb / Calf

Calf is a library that allows you to easily create adaptive UIs and access platform specific APIs with Compose Multiplatform (Adaptive UI, File Picker, WebView, Permissions...).
https://mohamedrejeb.github.io/Calf/
Apache License 2.0
709 stars 32 forks source link

Image picker on iOS doesn't return result on main thread #53

Closed iruizmar closed 4 months ago

iruizmar commented 5 months ago

Not sure if this is not the expected behaviour, but for some reason PHPicker is not invoking the callback function in the main thread.

A simple withContext(Dispatchers.Main) { solves it, but I don't want to open a PR until I'm sure it is wanted for it to be on the main thread or is something up to the user.

MohamedRejeb commented 5 months ago

Yes sure, feel free to open PR with the fix.