This commit is contained in:
Thomas Ricouard 2023-11-07 11:24:03 +01:00
parent 4266ac4b42
commit 32f96ac1ce

View file

@ -278,7 +278,6 @@ struct BlurOverLay: View {
@Environment(UserPreferences.self) private var preferences
@Environment(\.isCompact) private var isCompact: Bool
@Namespace var buttonSpace
var body: some View {
@ -289,7 +288,8 @@ struct BlurOverLay: View {
.background(.ultraThinMaterial)
.frame(
width: isFrameExpanded ? nil : 0,
height: isFrameExpanded ? nil : 0)
height: isFrameExpanded ? nil : 0
)
if !isCompact {
Button {
withAnimation(.spring(duration: 0.2)) {
@ -362,7 +362,7 @@ struct AltTextButton: View {
var body: some View {
if !isInCaptureMode,
let text = text,
let text,
!text.isEmpty,
!isCompact,
preferences.showAltTextForMedia
@ -412,7 +412,7 @@ private struct DisplayData: Identifiable, Hashable {
id = attachment.id
self.url = url
self.previewUrl = attachment.previewUrl ?? attachment.url
previewUrl = attachment.previewUrl ?? attachment.url
description = attachment.description
self.type = DisplayType(from: type)
accessibilityText = Self.getAccessibilityString(from: attachment)
@ -484,7 +484,7 @@ struct WrapperForPreview: View {
.padding()
}
static private let url = URL(string: "https://www.upwork.com/catalog-images/c5dffd9b5094556adb26e0a193a1c494")!
static private let attachment = MediaAttachment.imageWith(url: url)
static private let local = Locale(identifier: "en")
private static let url = URL(string: "https://www.upwork.com/catalog-images/c5dffd9b5094556adb26e0a193a1c494")!
private static let attachment = MediaAttachment.imageWith(url: url)
private static let local = Locale(identifier: "en")
}