saket / telephoto

Building blocks for designing media experiences in Compose UI
https://saket.github.io/telephoto/
Apache License 2.0
998 stars 33 forks source link

Flickers when image changes #114

Open mega-ht opened 1 day ago

mega-ht commented 1 day ago

When model (ImageRequest) changes in ZoomableAsyncImage, it causes a blinking glitch. I've tried Coil's default AsyncImage, and another subsampling library , both loads the new image without flickering. Is there any config in telephoto to avoid this?

val request = ImageRequest.Builder(LocalContext.current)
            .data(imagePath)
            .memoryCacheKey(imagePath)
            .placeholderMemoryCacheKey(previousImagePath)

Please let me know if you need more information. Thank you.

saket commented 1 day ago

That doesn't sound good. Can you help me reproduce this in the sample app?

mega-ht commented 1 day ago

Thanks for the fast response. I've forked the repository and updated the sample app here: https://github.com/mega-ht/telephoto/tree/flicker-issue [ Commit ] Hope it helps.