Fix sensitive attachments not being hidden in new timeline

This commit is contained in:
Shadowfacts 2022-10-09 19:15:41 -04:00
parent 412e4a4dc5
commit e78bec8409
2 changed files with 12 additions and 5 deletions

View File

@ -33,9 +33,17 @@ class AttachmentsContainerView: UIView {
} }
} }
override func awakeFromNib() { override init(frame: CGRect) {
super.awakeFromNib() super.init(frame: frame)
commonInit()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
commonInit()
}
private func commonInit() {
self.isUserInteractionEnabled = true self.isUserInteractionEnabled = true
self.layer.cornerRadius = 5 self.layer.cornerRadius = 5
self.layer.masksToBounds = true self.layer.masksToBounds = true

View File

@ -85,13 +85,12 @@ extension StatusCollectionViewCell {
contentContainer.contentTextView.setTextFrom(status: status) contentContainer.contentTextView.setTextFrom(status: status)
contentContainer.attachmentsView.delegate = self contentContainer.attachmentsView.delegate = self
contentContainer.attachmentsView.updateUI(status: status)
contentContainer.cardView.updateUI(status: status) contentContainer.cardView.updateUI(status: status)
contentContainer.cardView.isHidden = status.card == nil contentContainer.cardView.isHidden = status.card == nil
contentContainer.cardView.navigationDelegate = delegate contentContainer.cardView.navigationDelegate = delegate
contentContainer.cardView.actionProvider = delegate contentContainer.cardView.actionProvider = delegate
contentContainer.attachmentsView.updateUI(status: status)
updateStatusState(status: status) updateStatusState(status: status)
contentWarningLabel.text = status.spoilerText contentWarningLabel.text = status.spoilerText