Closed saket closed 2 weeks ago
Good catch! This is definitely a bug. Added a fix here that we can ship in a 3.0.1
release.
There are a bunch of tests around when AsyncImage
/rememberAsyncImagePainter
recompose here. I think it might be recomposing infinitely for you because Coil has overloads here that wrap passing the AsyncImageState
to the "real" stable, restartable implementation here.
That was fast, thank you!
While migrating telephoto to coil3, I noticed that some of my tests were running into infinite loops of image requests because the new equality delegate does not account for non-
ImageRequest
models.Was this an intention choice?
Here's how I'm using
AsyncImageModelEqualityDelegate
: https://github.com/saket/telephoto/blob/5d156f836441b2deb684427162ac22d5d00f29a6/zoomable-image/coil3/src/main/kotlin/me/saket/telephoto/zoomable/coil3/ZoomableAsyncImage.kt#L112It's also interesting that
AsyncImage()
does not seem to run into this problem. Are you relying on something else for diffing non-ImageRequest
models?