From ae3b3f11bfc67b8dae58eb9a588963124f457d53 Mon Sep 17 00:00:00 2001 From: Yusuf Suleman Date: Sat, 4 Apr 2026 13:15:19 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20card=20thumbnail=20overflow=20=E2=80=94?= =?UTF-8?q?=20use=20GeometryReader=20to=20constrain=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Images with .fill were expanding beyond the 180pt frame because SwiftUI's .clipped() doesn't constrain the layout, only the rendering. Now uses GeometryReader to set explicit width + height on the image, then clips the container. Guarantees 180pt max regardless of image aspect ratio. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Features/Reader/Views/EntryListView.swift | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift index 4d9f001..3e6ff27 100644 --- a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift @@ -255,12 +255,14 @@ struct EntryCardView: View { AsyncImage(url: thumbURL) { phase in switch phase { case .success(let image): - image - .resizable() - .aspectRatio(contentMode: .fill) - .frame(maxWidth: .infinity) - .frame(height: 180) - .clipped() + GeometryReader { geo in + image + .resizable() + .aspectRatio(contentMode: .fill) + .frame(width: geo.size.width, height: 180) + } + .frame(height: 180) + .clipped() default: Rectangle() .fill(Color.surfaceCard)