From 0cfd87ee2735cb17679861854c852d00e461c739 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Tue, 30 May 2023 12:13:20 +1000 Subject: [PATCH] Fixed a bug where the ProfilePictureView could incorrectly take up space when hidden --- SessionUIKit/Components/ProfilePictureView.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SessionUIKit/Components/ProfilePictureView.swift b/SessionUIKit/Components/ProfilePictureView.swift index e8b9350a6..1ffe575a7 100644 --- a/SessionUIKit/Components/ProfilePictureView.swift +++ b/SessionUIKit/Components/ProfilePictureView.swift @@ -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