mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-19 00:47:03 +00:00
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.