From c86d627cee664a620684b9971af544bd4db52d8a Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Tue, 9 Jan 2024 08:12:22 +0100 Subject: [PATCH] VisionOS fixes --- IceCubesApp/App/Tabs/Tabs.swift | 4 ++-- .../Sources/Timeline/TimelineUnreadStatusesObserver.swift | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/IceCubesApp/App/Tabs/Tabs.swift b/IceCubesApp/App/Tabs/Tabs.swift index feea6eab..0b4ad290 100644 --- a/IceCubesApp/App/Tabs/Tabs.swift +++ b/IceCubesApp/App/Tabs/Tabs.swift @@ -26,8 +26,8 @@ enum Tab: Int, Identifiable, Hashable, CaseIterable { if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac { [.timeline, .trending, .federated, .local, .notifications, .mentions, .explore, .messages, .bookmarks, .favorites, .profile, .settings] - } else if UIDevice.current.userInterfaceIdiom == .vision { - [.profile, .timeline, .trending, .federated, .local, .notifications, .mentions, .explore, .messages, .settings] + } else if UIDevice.current.userInterfaceIdiom == .vision { + [.profile, .timeline, .notifications, .mentions, .explore, .messages, .settings] } else { [.timeline, .notifications, .explore, .messages, .profile] } diff --git a/Packages/Timeline/Sources/Timeline/TimelineUnreadStatusesObserver.swift b/Packages/Timeline/Sources/Timeline/TimelineUnreadStatusesObserver.swift index cc7206b7..8f4b65bf 100644 --- a/Packages/Timeline/Sources/Timeline/TimelineUnreadStatusesObserver.swift +++ b/Packages/Timeline/Sources/Timeline/TimelineUnreadStatusesObserver.swift @@ -60,18 +60,15 @@ struct TimelineUnreadStatusesView: View { } .accessibilityLabel("accessibility.tabs.timeline.unread-posts.label-\(observer.pendingStatusesCount)") .accessibilityHint("accessibility.tabs.timeline.unread-posts.hint") - #if os(visionOS) .buttonStyle(.bordered) .tint(Material.ultraThick) - #else - .buttonStyle(.bordered) - .background(Material.ultraThick) - #endif .cornerRadius(8) + #if !os(visionOS) .overlay( RoundedRectangle(cornerRadius: 8) .stroke(theme.tintColor, lineWidth: 1) ) + #endif .padding(8) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: preferences.pendingLocation) }