diff --git a/Threaded/Components/Post/CompactPostView.swift b/Threaded/Components/Post/CompactPostView.swift index 0d71808..3fa6d96 100644 --- a/Threaded/Components/Post/CompactPostView.swift +++ b/Threaded/Components/Post/CompactPostView.swift @@ -45,10 +45,10 @@ struct CompactPostView: View { initialLike = isLiked } .task { - await loadEmbeddedStatus(status: status) +// await loadEmbeddedStatus(status: status) if let client = accountManager.getClient() { - if let newStatus: Status = try? await client.get(endpoint: Statuses.status(id: status.reblog?.id ?? status.id)) { + if let newStatus: Status = try? await client.get(endpoint: Statuses.status(id: status.id)) { status = newStatus } } @@ -188,7 +188,7 @@ struct CompactPostView: View { if status.reblog != nil { HStack (alignment:.center, spacing: 5) { - Image(systemName: "bolt.horizontal") + Image(systemName: "bolt.horizontal.fill") Text("status.reposted-by.\(status.account.username)") } diff --git a/Threaded/Components/Post/PostAttachment.swift b/Threaded/Components/Post/PostAttachment.swift index 0481352..1464479 100644 --- a/Threaded/Components/Post/PostAttachment.swift +++ b/Threaded/Components/Post/PostAttachment.swift @@ -68,6 +68,7 @@ struct PostAttachment: View { .onAppear { if let url = attachment.url { player = AVPlayer(url: url) + player?.preventsDisplaySleepDuringVideoPlayback = false player?.audiovisualBackgroundPlaybackPolicy = .pauses player?.isMuted = true player?.play() @@ -104,8 +105,9 @@ struct PostAttachment: View { .onAppear { if let url = attachment.url { player = AVPlayer(url: url) + player?.preventsDisplaySleepDuringVideoPlayback = false player?.audiovisualBackgroundPlaybackPolicy = .pauses - player?.isMuted = false + player?.isMuted = true player?.play() } } diff --git a/Threaded/Components/ProfileView.swift b/Threaded/Components/ProfileView.swift index 1e7dedb..7e0c78e 100644 --- a/Threaded/Components/ProfileView.swift +++ b/Threaded/Components/ProfileView.swift @@ -153,7 +153,6 @@ struct ProfileView: View { .safeAreaPadding(.vertical) .padding(.horizontal) } - .environmentObject(navigator) } var statusesList: some View { diff --git a/Threaded/Data/HapticManager.swift b/Threaded/Data/HapticManager.swift index 0a53c7d..79a8874 100644 --- a/Threaded/Data/HapticManager.swift +++ b/Threaded/Data/HapticManager.swift @@ -54,6 +54,7 @@ class HapticManager { do { HapticManager.engine = try CHHapticEngine() + engine?.isMutedForHaptics = false try engine?.start() } catch { print("Error creating the engine: \(error.localizedDescription)") diff --git a/Threaded/Views/Settings/SettingsView.swift b/Threaded/Views/Settings/SettingsView.swift index c4388b6..19c9257 100644 --- a/Threaded/Views/Settings/SettingsView.swift +++ b/Threaded/Views/Settings/SettingsView.swift @@ -3,8 +3,8 @@ import SwiftUI struct SettingsView: View { + @Environment(UniversalNavigator.self) private var uniNav: UniversalNavigator @State var navigator: Navigator - @State private var sheet: SheetDestination? var body: some View { NavigationStack(path: $navigator.path) { @@ -42,7 +42,7 @@ struct SettingsView: View { AppAccount.clear() navigator.path = [] navigator.selectedTab = .timeline - sheet = .welcome + uniNav.presentedCover = .welcome } label: { Text("logout") .foregroundStyle(.red) @@ -52,7 +52,6 @@ struct SettingsView: View { } } .withAppRouter(navigator) - .withCovers(sheetDestination: $sheet) .listThreaded() .navigationTitle("settings") .navigationBarTitleDisplayMode(.inline)