forked from shadowfacts/Tusker
Fix constraints breaking on expand thread cell
This commit is contained in:
parent
468af3f9a6
commit
1f95a6cb8e
|
@ -54,9 +54,12 @@ class ExpandThreadCollectionViewCell: UICollectionViewListCell {
|
||||||
threadLinkViewFullHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor)
|
threadLinkViewFullHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor)
|
||||||
threadLinkViewShortHeightConstraint = threadLinkView.bottomAnchor.constraint(equalTo: avatarContainerView.topAnchor, constant: -2)
|
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([
|
NSLayoutConstraint.activate([
|
||||||
avatarContainerWidthConstraint,
|
avatarContainerWidthConstraint,
|
||||||
avatarContainerView.heightAnchor.constraint(equalToConstant: 32),
|
avatarContainerHeightConstraint,
|
||||||
|
|
||||||
stackViewLeadingConstraint,
|
stackViewLeadingConstraint,
|
||||||
hStack.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),
|
hStack.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),
|
||||||
|
|
Loading…
Reference in New Issue