Fix constraints breaking on expand thread cell

This commit is contained in:
Shadowfacts 2023-05-14 19:08:52 -04:00
parent 468af3f9a6
commit 1f95a6cb8e
1 changed files with 4 additions and 1 deletions

View File

@ -54,9 +54,12 @@ class ExpandThreadCollectionViewCell: UICollectionViewListCell {
threadLinkViewFullHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor)
threadLinkViewShortHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: avatarContainerView.topAnchor, constant: -2)
let avatarContainerHeightConstraint = avatarContainerView.heightAnchor.constraint(equalToConstant: 32)
// let this be broken during intermediate layouts when the collection view imposes a height constraint
avatarContainerHeightConstraint.priority = .init(999)
NSLayoutConstraint.activate([
avatarContainerWidthConstraint,
avatarContainerView.heightAnchor.constraint(equalToConstant: 32),
avatarContainerHeightConstraint,
stackViewLeadingConstraint,
hStack.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),