Fix link preview image size

This commit is contained in:
Thomas Ricouard 2023-02-17 19:11:09 +01:00
parent c02cbde72e
commit 88fdeec100

View file

@ -17,12 +17,14 @@ public struct StatusRowCardView: View {
if let title = card.title, let url = URL(string: card.url) {
VStack(alignment: .leading) {
if let imageURL = card.image {
GeometryReader { proxy in
LazyImage(url: imageURL) { state in
if let image = state.imageContainer?.image {
SwiftUI.Image(uiImage: image)
.resizable()
.aspectRatio(contentMode: .fill)
.frame(height: 200)
.frame(maxWidth: proxy.frame(in: .local).width)
.clipped()
} else if state.isLoading {
Rectangle()
@ -30,6 +32,7 @@ public struct StatusRowCardView: View {
.frame(height: 200)
}
}
}
.frame(height: 200)
}
HStack {