mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-01 20:51:25 +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,17 +17,20 @@ 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 {
|
||||||
LazyImage(url: imageURL) { state in
|
GeometryReader { proxy in
|
||||||
if let image = state.imageContainer?.image {
|
LazyImage(url: imageURL) { state in
|
||||||
SwiftUI.Image(uiImage: image)
|
if let image = state.imageContainer?.image {
|
||||||
.resizable()
|
SwiftUI.Image(uiImage: image)
|
||||||
.aspectRatio(contentMode: .fill)
|
.resizable()
|
||||||
.frame(height: 200)
|
.aspectRatio(contentMode: .fill)
|
||||||
.clipped()
|
.frame(height: 200)
|
||||||
} else if state.isLoading {
|
.frame(maxWidth: proxy.frame(in: .local).width)
|
||||||
Rectangle()
|
.clipped()
|
||||||
.fill(Color.gray)
|
} else if state.isLoading {
|
||||||
.frame(height: 200)
|
Rectangle()
|
||||||
|
.fill(Color.gray)
|
||||||
|
.frame(height: 200)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(height: 200)
|
.frame(height: 200)
|
||||||
|
|
Loading…
Reference in a new issue