fix some bugs: 1. caption being displayed when blank 2. gallery should be tapped even when scanning fails

This commit is contained in:
Mauro Romito
2026-07-31 16:45:11 +02:00
committed by Mauro
parent d7127562d7
commit 56d22104ad
2 changed files with 4 additions and 3 deletions
@@ -32,8 +32,6 @@ struct GalleryItemTileView: View {
videoOverlay
}
}
.contentShape(Rectangle())
.onTapGesture { onTap() }
.accessibilityElement(children: .ignore)
.accessibilityLabel(item.filename)
} scanningContent: {
@@ -46,6 +44,9 @@ struct GalleryItemTileView: View {
overflowOverlay
}
}
// Tappable in every scan state, so that an unsafe item can't hide the rest of the gallery.
.contentShape(Rectangle())
.onTapGesture { onTap() }
}
@ViewBuilder
@@ -107,7 +107,7 @@ nonisolated struct RoomMessageEventStringBuilder {
}
private func buildMessage(for style: Style, caption: String?, type: String) -> AttributedString {
guard let caption else {
guard let caption, !caption.isBlank else {
return AttributedString(type)
}