This commit is contained in:
Thomas Ricouard 2023-11-07 11:24:03 +01:00
parent 4266ac4b42
commit 32f96ac1ce
1 changed files with 40 additions and 40 deletions

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)) {
@ -304,7 +304,7 @@ struct BlurOverLay: View {
ViewThatFits(in: .horizontal) {
HStack {
Image(systemName: "eye")
Text(sensitive ? "status.media.sensitive.show" : "status.media.content.show" )
Text(sensitive ? "status.media.sensitive.show" : "status.media.content.show")
}
HStack {
Image(systemName: "eye")
@ -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)
@ -457,7 +457,7 @@ struct WrapperForPreview: View {
VStack {
ScrollView {
VStack {
ForEach(1..<5) { number in
ForEach(1 ..< 5) { number in
VStack {
Text("Preview for \(number) item(s)")
StatusRowMediaPreviewView(
@ -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")
}