android-maps-compose
android-maps-compose copied to clipboard
View isn't updated after recomposition
I have seen it in more complex applications, but this is the easiest reproduction view:
@Composable
fun ClusterItemConversation() {
val x = remember { mutableIntStateOf(0) }
LaunchedEffect(key1 = Unit) {
// This just delays the execution
dispatchToMainThread(2000) {
x.value += 1
log { "Updated" }
}
}
Column(verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally) {
Text(text = x.value.toString())
}
}
// Some map code...
Clustering(items = clusterItems, clusterItemContent = { ci ->
ClusterItemConversation()
})
In the logging I can observe that Updated is there, but the view isn't updated at all, the text remains 0. The view is out of sync.