crash fixes?

This commit is contained in:
cranci1 2025-08-07 09:49:34 +02:00
parent 1ebb400336
commit 9db0f353f7
3 changed files with 18 additions and 18 deletions

View file

@ -19,22 +19,6 @@ struct SoraApp: App {
if let userAccentColor = UserDefaults.standard.color(forKey: "accentColor") {
UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self]).tintColor = userAccentColor
}
Task {
await Self.clearTmpFolder()
await MainActor.run {
jsController.initializeDownloadSession()
}
TraktToken.checkAuthenticationStatus { isAuthenticated in
if isAuthenticated {
Logger.shared.log("Trakt authentication is valid", type: "Debug")
} else {
Logger.shared.log("Trakt authentication required", type: "Debug")
}
}
}
}
var body: some Scene {
@ -60,6 +44,21 @@ struct SoraApp: App {
await moduleManager.refreshModules()
}
}
Task {
await Self.clearTmpFolder()
await MainActor.run {
jsController.initializeDownloadSession()
}
TraktToken.checkAuthenticationStatus { isAuthenticated in
if isAuthenticated {
Logger.shared.log("Trakt authentication is valid", type: "Debug")
} else {
Logger.shared.log("Trakt authentication required", type: "Debug")
}
}
}
}
.onOpenURL { url in
handleURL(url)

View file

@ -30,7 +30,7 @@ enum VideoQualityPreference: String, CaseIterable {
}
}
let preferredIndex = qualityPriority.firstIndex(of: preferred) ?? qualityPriority.count
_ = qualityPriority.firstIndex(of: preferred) ?? qualityPriority.count
for i in 0..<qualityPriority.count {
let candidate = qualityPriority[i]

View file

@ -330,7 +330,8 @@ struct TabBar: View {
.frame(width: tabWidth)
.opacity(isActive ? 1 : 0.5)
.scaleEffect(scale)
return icon
icon
.contentShape(Rectangle())
.simultaneousGesture(
TapGesture()