Fixed a bug where the ProfilePictureView could incorrectly take up space when hidden

This commit is contained in:
Morgan Pretty 2023-05-30 12:13:20 +10:00
parent fd2794cbc2
commit 0cfd87ee27
1 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,12 @@ public final class ProfilePictureView: UIView {
imageContainerView.layer.cornerRadius = (clipsToBounds ? (size.multiImageSize / 2) : 0)
}
}
public override var isHidden: Bool {
didSet {
widthConstraint.constant = (isHidden ? 0 : size.viewSize)
heightConstraint.constant = (isHidden ? 0 : size.viewSize)
}
}
// MARK: - Constraints