Fixes #2253 - Fix timeline thumbnail frames for media missing sizing info
This commit is contained in:
@@ -27,10 +27,15 @@ extension View {
|
||||
aspectRatio(contentAspectRatio, contentMode: .fit)
|
||||
.frame(minHeight: minMediaHeight, maxHeight: minMediaHeight)
|
||||
} else {
|
||||
aspectRatio(contentAspectRatio, contentMode: .fit)
|
||||
.frame(maxHeight: min(maxMediaHeight, max(minMediaHeight, contentHeight ?? .infinity)))
|
||||
// Required to prevent the reply details to get higher priority in rendering the width of the view.
|
||||
.aspectRatio(contentAspectRatio, contentMode: .fit)
|
||||
if let contentAspectRatio {
|
||||
aspectRatio(contentAspectRatio, contentMode: .fit)
|
||||
.frame(maxHeight: min(maxMediaHeight, max(minMediaHeight, contentHeight ?? .infinity)))
|
||||
// Required to prevent the reply details to get higher priority in rendering the width of the view.
|
||||
.aspectRatio(contentAspectRatio, contentMode: .fit)
|
||||
} else { // Otherwise let the image load and use its native aspect ratio with a max height
|
||||
aspectRatio(contentMode: .fit)
|
||||
.frame(maxHeight: maxMediaHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user