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.
This commit is contained in:
Shadowfacts 2019-11-28 21:22:13 -05:00
parent 7140590ccf
commit d5232c0b03
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 3 additions and 2 deletions

View File

@ -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 {