Files
Narasimha-sc 96c662d068 android, desktop: fix crash on opening chat with extremely wide image (#7123)
* android, desktop: fix crash on opening chat with extremely wide image

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).

* docs: add plan justifying wide-image chat crash fix
2026-06-23 12:24:35 +01:00
..