fixes and improvements
This commit is contained in:
parent
fc90c766d9
commit
58a34b75c3
@ -45,10 +45,10 @@ struct CompactPostView: View {
|
|||||||
initialLike = isLiked
|
initialLike = isLiked
|
||||||
}
|
}
|
||||||
.task {
|
.task {
|
||||||
await loadEmbeddedStatus(status: status)
|
// await loadEmbeddedStatus(status: status)
|
||||||
|
|
||||||
if let client = accountManager.getClient() {
|
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
|
status = newStatus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -188,7 +188,7 @@ struct CompactPostView: View {
|
|||||||
|
|
||||||
if status.reblog != nil {
|
if status.reblog != nil {
|
||||||
HStack (alignment:.center, spacing: 5) {
|
HStack (alignment:.center, spacing: 5) {
|
||||||
Image(systemName: "bolt.horizontal")
|
Image(systemName: "bolt.horizontal.fill")
|
||||||
|
|
||||||
Text("status.reposted-by.\(status.account.username)")
|
Text("status.reposted-by.\(status.account.username)")
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,7 @@ struct PostAttachment: View {
|
|||||||
.onAppear {
|
.onAppear {
|
||||||
if let url = attachment.url {
|
if let url = attachment.url {
|
||||||
player = AVPlayer(url: url)
|
player = AVPlayer(url: url)
|
||||||
|
player?.preventsDisplaySleepDuringVideoPlayback = false
|
||||||
player?.audiovisualBackgroundPlaybackPolicy = .pauses
|
player?.audiovisualBackgroundPlaybackPolicy = .pauses
|
||||||
player?.isMuted = true
|
player?.isMuted = true
|
||||||
player?.play()
|
player?.play()
|
||||||
@ -104,8 +105,9 @@ struct PostAttachment: View {
|
|||||||
.onAppear {
|
.onAppear {
|
||||||
if let url = attachment.url {
|
if let url = attachment.url {
|
||||||
player = AVPlayer(url: url)
|
player = AVPlayer(url: url)
|
||||||
|
player?.preventsDisplaySleepDuringVideoPlayback = false
|
||||||
player?.audiovisualBackgroundPlaybackPolicy = .pauses
|
player?.audiovisualBackgroundPlaybackPolicy = .pauses
|
||||||
player?.isMuted = false
|
player?.isMuted = true
|
||||||
player?.play()
|
player?.play()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,6 @@ struct ProfileView: View {
|
|||||||
.safeAreaPadding(.vertical)
|
.safeAreaPadding(.vertical)
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
}
|
}
|
||||||
.environmentObject(navigator)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var statusesList: some View {
|
var statusesList: some View {
|
||||||
|
@ -54,6 +54,7 @@ class HapticManager {
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
HapticManager.engine = try CHHapticEngine()
|
HapticManager.engine = try CHHapticEngine()
|
||||||
|
engine?.isMutedForHaptics = false
|
||||||
try engine?.start()
|
try engine?.start()
|
||||||
} catch {
|
} catch {
|
||||||
print("Error creating the engine: \(error.localizedDescription)")
|
print("Error creating the engine: \(error.localizedDescription)")
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct SettingsView: View {
|
struct SettingsView: View {
|
||||||
|
@Environment(UniversalNavigator.self) private var uniNav: UniversalNavigator
|
||||||
@State var navigator: Navigator
|
@State var navigator: Navigator
|
||||||
@State private var sheet: SheetDestination?
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationStack(path: $navigator.path) {
|
NavigationStack(path: $navigator.path) {
|
||||||
@ -42,7 +42,7 @@ struct SettingsView: View {
|
|||||||
AppAccount.clear()
|
AppAccount.clear()
|
||||||
navigator.path = []
|
navigator.path = []
|
||||||
navigator.selectedTab = .timeline
|
navigator.selectedTab = .timeline
|
||||||
sheet = .welcome
|
uniNav.presentedCover = .welcome
|
||||||
} label: {
|
} label: {
|
||||||
Text("logout")
|
Text("logout")
|
||||||
.foregroundStyle(.red)
|
.foregroundStyle(.red)
|
||||||
@ -52,7 +52,6 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.withAppRouter(navigator)
|
.withAppRouter(navigator)
|
||||||
.withCovers(sheetDestination: $sheet)
|
|
||||||
.listThreaded()
|
.listThreaded()
|
||||||
.navigationTitle("settings")
|
.navigationTitle("settings")
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user