mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-29 11:41:01 +00:00
Fix link preview image size
This commit is contained in:
parent
c02cbde72e
commit
88fdeec100
1 changed files with 14 additions and 11 deletions
|
@ -17,12 +17,14 @@ public struct StatusRowCardView: View {
|
||||||
if let title = card.title, let url = URL(string: card.url) {
|
if let title = card.title, let url = URL(string: card.url) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
if let imageURL = card.image {
|
if let imageURL = card.image {
|
||||||
|
GeometryReader { proxy in
|
||||||
LazyImage(url: imageURL) { state in
|
LazyImage(url: imageURL) { state in
|
||||||
if let image = state.imageContainer?.image {
|
if let image = state.imageContainer?.image {
|
||||||
SwiftUI.Image(uiImage: image)
|
SwiftUI.Image(uiImage: image)
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fill)
|
.aspectRatio(contentMode: .fill)
|
||||||
.frame(height: 200)
|
.frame(height: 200)
|
||||||
|
.frame(maxWidth: proxy.frame(in: .local).width)
|
||||||
.clipped()
|
.clipped()
|
||||||
} else if state.isLoading {
|
} else if state.isLoading {
|
||||||
Rectangle()
|
Rectangle()
|
||||||
|
@ -30,6 +32,7 @@ public struct StatusRowCardView: View {
|
||||||
.frame(height: 200)
|
.frame(height: 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.frame(height: 200)
|
.frame(height: 200)
|
||||||
}
|
}
|
||||||
HStack {
|
HStack {
|
||||||
|
|
Loading…
Reference in a new issue