David Edwards
03/10/2021, 4:58 PMLaunchedEffect(true) {
while (isActive) {
delay(60000L)
vm.getData()
}
}
Is there a better pattern to use in this case?Adam Powell
03/10/2021, 5:24 PMandroidx:lifecycle:lifecycle-ktx
that will look more like:
LaunchedEffect(true) {
repeatOnLifecycle(Lifecycle.State.STARTED) {
while (true) {
delay(...)
vm.getData()
}
}
}
David Edwards
03/10/2021, 5:25 PMAdam Powell
04/20/2021, 4:45 PMDavid Edwards
04/20/2021, 4:53 PM2.4.0-alpha01
. I didn't notice a new alpha version.