feat(status): Change max media height to be full-width and centered
This commit is contained in:
parent
c4bc83dbd3
commit
75b5836fa3
|
@ -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),
|
||||
])
|
||||
}
|
||||
|
|
|
@ -609,7 +609,7 @@ extension StatusView {
|
|||
if style == .plain {
|
||||
return .greatestFiniteMagnitude
|
||||
}
|
||||
return 512
|
||||
return 300
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue