mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-18 08:16:13 +00:00
An image with an extreme aspect ratio (e.g. 4000x1) made the chat unopenable: the framed item's Box clamped its aspectRatio only on the low side (coerceAtLeast(1f / 2.33f)), leaving very wide images unbounded. During an intrinsic measure pass Compose derives width = height * ratio, which for a 4000:1 image overflows Constraints and throws IllegalArgumentException on every render. Add the symmetric upper bound (coerceIn(1f / 2.33f, 2.33f)), matching the existing tall-image height cap in PriorityLayout (constraints.maxWidth * 2.33f).