saket / telephoto

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

Fixes an issue in with placeholder sizing. #84

Closed rharter closed 7 months ago

rharter commented 7 months ago

In cases in which the placeholder's intrinsic size is updated, the preview would not be updated to use that size. When using an AsyncImagePainter from Coil, this results in the the Loading state's empty size being used to calculate the placeholder position iff the content size is resolved before the placeholder, causing the placeholder to fill the view.

This change fixes that issue by adding the placeholder's intrinsicSize as a key for the FixedSizePainter's remember call.