Files
simplex-chat/apps
Narasimha-sc e7d3041281 android, desktop: keep wide images at natural aspect ratio without crashing
The merged fix clamped the framed image preview's aspect ratio at 2.33,
which prevents the Constraints overflow crash but reshapes every image
wider than 2.33:1 to 2.33:1.

Compute the box height directly (height = w * min(h / w, 2.33f)) instead
of deriving it via Modifier.aspectRatio. Very wide images keep their
natural ratio (no upper clamp) while taller images stay capped at 2.33,
and the overflow-prone width = height * ratio derivation is removed
entirely. This mirrors how the iOS app sizes image previews.
2026-06-23 11:29:40 +00:00
..
2026-06-22 19:35:48 +01:00