Don't display empty alt
This commit is contained in:
parent
6f0bad30ac
commit
a351fb8a7b
|
@ -123,7 +123,7 @@ public struct StatusMediaPreviewView: View {
|
||||||
.shimmering()
|
.shimmering()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let alt = attachement.description, !isCompact {
|
if let alt = attachement.description, !alt.isEmpty, !isCompact {
|
||||||
Button {
|
Button {
|
||||||
altTextDisplayed = alt
|
altTextDisplayed = alt
|
||||||
isAltAlertDisplayed = true
|
isAltAlertDisplayed = true
|
||||||
|
@ -184,7 +184,7 @@ public struct StatusMediaPreviewView: View {
|
||||||
}
|
}
|
||||||
.frame(width: isCompact ? imageMaxHeight : proxy.frame(in: .local).width)
|
.frame(width: isCompact ? imageMaxHeight : proxy.frame(in: .local).width)
|
||||||
.frame(height: imageMaxHeight)
|
.frame(height: imageMaxHeight)
|
||||||
if let alt = attachement.description, !isCompact {
|
if let alt = attachement.description, !alt.isEmpty, !isCompact {
|
||||||
Button {
|
Button {
|
||||||
altTextDisplayed = alt
|
altTextDisplayed = alt
|
||||||
isAltAlertDisplayed = true
|
isAltAlertDisplayed = true
|
||||||
|
|
Loading…
Reference in New Issue