feat(status): Change max media height to be full-width and centered

This commit is contained in:
Marcus Kida 2023-01-05 16:57:24 +01:00
parent c4bc83dbd3
commit 75b5836fa3
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
2 changed files with 4 additions and 4 deletions

View File

@ -166,13 +166,13 @@ extension MediaGridContainerView {
func layout(in view: UIView, mediaView: MediaView) {
let imageViewSize = AVMakeRect(aspectRatio: aspectRatio, insideRect: CGRect(origin: .zero, size: maxSize)).size
mediaView.translatesAutoresizingMaskIntoConstraints = false
mediaView.contentMode = .center
view.addSubview(mediaView)
NSLayoutConstraint.activate([
mediaView.topAnchor.constraint(equalTo: view.topAnchor),
mediaView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
mediaView.trailingAnchor.constraint(equalTo: view.trailingAnchor).priority(.defaultLow),
mediaView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
mediaView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
mediaView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
mediaView.widthAnchor.constraint(equalToConstant: imageViewSize.width).priority(.required - 1),
mediaView.heightAnchor.constraint(equalToConstant: imageViewSize.height).priority(.required - 1),
])
}

View File

@ -609,7 +609,7 @@ extension StatusView {
if style == .plain {
return .greatestFiniteMagnitude
}
return 512
return 300
}
}