From d5232c0b036836d5e830e64d1693803314023eef Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 28 Nov 2019 21:22:13 -0500 Subject: [PATCH] Fix content warning label always showing in conversation main status When the conversation was opened, the status state of the main status would already be known, so the CW label wasn't getting updated or hidden/shown. --- Tusker/Views/Status/BaseStatusTableViewCell.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tusker/Views/Status/BaseStatusTableViewCell.swift b/Tusker/Views/Status/BaseStatusTableViewCell.swift index e9e9cf3814..7816e5c8ff 100644 --- a/Tusker/Views/Status/BaseStatusTableViewCell.swift +++ b/Tusker/Views/Status/BaseStatusTableViewCell.swift @@ -126,11 +126,12 @@ class BaseStatusTableViewCell: UITableViewCell { contentLabel.statusID = statusID + contentWarningLabel.text = status.spoilerText + contentWarningLabel.isHidden = status.spoilerText.isEmpty + if state.unknown { collapsible = !status.spoilerText.isEmpty var shouldCollapse = collapsible - contentWarningLabel.text = status.spoilerText - contentWarningLabel.isHidden = status.spoilerText.isEmpty if !shouldCollapse, let text = contentLabel.text, text.count > 500 {