diff --git a/Tusker/Views/Status/StatusCollectionViewCell.swift b/Tusker/Views/Status/StatusCollectionViewCell.swift index d2108875..4e362e84 100644 --- a/Tusker/Views/Status/StatusCollectionViewCell.swift +++ b/Tusker/Views/Status/StatusCollectionViewCell.swift @@ -22,7 +22,7 @@ protocol StatusCollectionViewCell: UICollectionViewCell { var displayNameLabel: EmojiLabel { get } var usernameLabel: UILabel { get } var contentWarningLabel: EmojiLabel { get } - var collapseButton: UIButton { get } + var collapseButton: StatusCollapseButton { get } var contentContainer: StatusContentContainer { get } var replyButton: UIButton { get } var favoriteButton: UIButton { get } diff --git a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift index 06147d9e..2cce1e7c 100644 --- a/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/TimelineStatusCollectionViewCell.swift @@ -122,10 +122,11 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti ]), size: 0) // this needs to have a higher priorty than the content container's zero height constraint $0.setContentHuggingPriority(.defaultHigh, for: .vertical) + $0.isUserInteractionEnabled = true $0.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(collapseButtonPressed))) } - private(set) lazy var collapseButton = UIButton(configuration: { + private(set) lazy var collapseButton = StatusCollapseButton(configuration: { var config = UIButton.Configuration.filled() config.image = UIImage(systemName: "chevron.down") return config