mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-01-22 05:32:28 +01:00
Hide post contentMetaText when it is empty
This commit is contained in:
parent
da3f631380
commit
a05b794090
@ -314,16 +314,18 @@ extension StatusView.ViewModel {
|
|||||||
}
|
}
|
||||||
statusView.contentMetaText.paragraphStyle = paragraphStyle
|
statusView.contentMetaText.paragraphStyle = paragraphStyle
|
||||||
|
|
||||||
if let content = content {
|
if let content = content, !(content.string.isEmpty && content.entities.isEmpty) {
|
||||||
statusView.contentMetaText.configure(
|
statusView.contentMetaText.configure(
|
||||||
content: content
|
content: content
|
||||||
)
|
)
|
||||||
statusView.contentMetaText.textView.accessibilityTraits = [.staticText]
|
statusView.contentMetaText.textView.accessibilityTraits = [.staticText]
|
||||||
statusView.contentMetaText.textView.accessibilityElementsHidden = false
|
statusView.contentMetaText.textView.accessibilityElementsHidden = false
|
||||||
|
statusView.contentMetaText.textView.isHidden = false
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
statusView.contentMetaText.reset()
|
statusView.contentMetaText.reset()
|
||||||
statusView.contentMetaText.textView.accessibilityLabel = ""
|
statusView.contentMetaText.textView.accessibilityLabel = ""
|
||||||
|
statusView.contentMetaText.textView.isHidden = true
|
||||||
}
|
}
|
||||||
|
|
||||||
statusView.contentMetaText.textView.alpha = isContentReveal ? 1 : 0 // keep the frame size and only display when revealing
|
statusView.contentMetaText.textView.alpha = isContentReveal ? 1 : 0 // keep the frame size and only display when revealing
|
||||||
|
Loading…
Reference in New Issue
Block a user