From b232bec80f459a1df9bb7ab650cd85a62e51a921 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 11 Mar 2020 21:56:35 -0400 Subject: [PATCH] Show custom emojis in content warnings Closes #95 --- Tusker/Views/Status/BaseStatusTableViewCell.swift | 5 ++++- Tusker/Views/Status/ConversationMainStatusTableViewCell.xib | 2 +- Tusker/Views/Status/TimelineStatusTableViewCell.xib | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Tusker/Views/Status/BaseStatusTableViewCell.swift b/Tusker/Views/Status/BaseStatusTableViewCell.swift index 55e20f63..fb1a7976 100644 --- a/Tusker/Views/Status/BaseStatusTableViewCell.swift +++ b/Tusker/Views/Status/BaseStatusTableViewCell.swift @@ -27,7 +27,7 @@ class BaseStatusTableViewCell: UITableViewCell { @IBOutlet weak var avatarImageView: UIImageView! @IBOutlet weak var displayNameLabel: EmojiLabel! @IBOutlet weak var usernameLabel: UILabel! - @IBOutlet weak var contentWarningLabel: UILabel! + @IBOutlet weak var contentWarningLabel: EmojiLabel! @IBOutlet weak var collapseButton: UIButton! @IBOutlet weak var contentTextView: StatusContentTextView! @IBOutlet weak var attachmentsView: AttachmentsContainerView! @@ -137,6 +137,9 @@ class BaseStatusTableViewCell: UITableViewCell { contentWarningLabel.text = status.spoilerText contentWarningLabel.isHidden = status.spoilerText.isEmpty + if !contentWarningLabel.isHidden { + contentWarningLabel.setEmojis(status.emojis, identifier: statusID) + } if state.unknown { collapsible = !status.spoilerText.isEmpty diff --git a/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib b/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib index 07b2cf8a..657ab94b 100644 --- a/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib +++ b/Tusker/Views/Status/ConversationMainStatusTableViewCell.xib @@ -52,7 +52,7 @@ -