Tiago Nunes
07/27/2021, 3:05 PMval imageFiles = produceState(initialValue = emptyList<File>(), imageRefs) {
imageRefs.map { imageRef ->
async {
downloadItemImage(imageRef, file)
}
}.awaitAll().filterNotNull()
}
Then, I’d like to map this List<File> to a List<Painter>, and send it to my ImagesRow composable, like this:
val painters = imageFiles.value.map { file ->
rememberImagePainter(file)
}
ImagesRow(painters = painters)
Problem is: The painters aren’t being updated when imageFiles is updated. Any ideas?Zach Klippenstein (he/him) [MOD]
07/27/2021, 3:08 PMvalue
in your produceState
.Tiago Nunes
07/27/2021, 3:09 PMZach Klippenstein (he/him) [MOD]
07/27/2021, 3:14 PM