Don't display empty alt

This commit is contained in:
Thomas Ricouard 2023-01-03 13:14:13 +01:00
parent 6f0bad30ac
commit a351fb8a7b
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ public struct StatusMediaPreviewView: View {
.shimmering()
}
}
if let alt = attachement.description, !isCompact {
if let alt = attachement.description, !alt.isEmpty, !isCompact {
Button {
altTextDisplayed = alt
isAltAlertDisplayed = true
@ -184,7 +184,7 @@ public struct StatusMediaPreviewView: View {
}
.frame(width: isCompact ? imageMaxHeight : proxy.frame(in: .local).width)
.frame(height: imageMaxHeight)
if let alt = attachement.description, !isCompact {
if let alt = attachement.description, !alt.isEmpty, !isCompact {
Button {
altTextDisplayed = alt
isAltAlertDisplayed = true