bkenn
12/29/2019, 4:16 AMGlobalScope.launch(Dispatchers.Main) {
// replace delay with some kind of animation on ui elements
delay(2000)
navigateTo(Screen.Question)
}Adam Powell
12/29/2019, 5:57 PMonCommit effect block or similar; if your UI gets recomposed you will get multiple launches happeningAdam Powell
12/29/2019, 5:59 PM.await the end of an animation or something like it; we don't have a lot of robust suspending APIs in the base compose libraries yet since the version of the IR compiler we're using still has some bugs that make working with suspend prohibitive. Those APIs will come once those bugs are resolvedbkenn
12/29/2019, 7:25 PMonCommit and onActive. Would it not be better for this use case to use onActive? I put some logging into both onActive and onCommit of the splash screen compostable function. OnActive was called once while onCommit was called 11 times. Seems that however my code is currently structured is causing the splash screen to recompose a lot.Adam Powell
12/29/2019, 7:30 PMonActive is probably appropriate in here, but it's also likely to be removed in a later update. Its docs describe that it's just an alias for essentially onCommit(true) { } or onCommit(Unit) { } or some other constant that will never changeAdam Powell
12/29/2019, 7:30 PMAdam Powell
12/29/2019, 7:32 PM