Consider adding a boolean to disable GlobalSnapshotManager.ensureStarted()
call during scene creation
#4800
Labels
GlobalSnapshotManager.ensureStarted()
call during scene creation
#4800
I am building Compose UI for a target you do not support using your repo. Thanks for all the hard work I can easily build upon!
It's hard to build Compose UI for targets which do not have
Dispatchers.Main
available from coroutines due to the global snapshot manager. I have a UI thread in my app, but it doesn't exist until I create it as part of app initialization. It is not known at the time that this library (well, compose-multiplatform-core) is being compiled.I would like to set my
GlobalSnapshotManagerDispatcher
actual to throw when accessed, and instead initialize code similar to the implementation of global snapshot manager myself (before creating my scene).Would you be open to a boolean flag for scene creation that disables the call to
GlobalSnapshotManager.ensureStarted()
inBaseComposeScene
?Of course, I could just disable this call myself, but I would prefer to leave the common sources untouched so that my changes are solely within source sets for the new target.
The text was updated successfully, but these errors were encountered: