From 1f95a6cb8e9b2a3bd3b70a226bfa4c9b6c316d6f Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 14 May 2023 19:08:52 -0400 Subject: [PATCH] Fix constraints breaking on expand thread cell --- .../Conversation/ExpandThreadCollectionViewCell.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift b/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift index 8b9ef49d..260dfa5d 100644 --- a/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift +++ b/Tusker/Screens/Conversation/ExpandThreadCollectionViewCell.swift @@ -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),