mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
crash fixes?
This commit is contained in:
parent
1ebb400336
commit
9db0f353f7
3 changed files with 18 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -330,7 +330,8 @@ struct TabBar: View {
|
|||
.frame(width: tabWidth)
|
||||
.opacity(isActive ? 1 : 0.5)
|
||||
.scaleEffect(scale)
|
||||
return icon
|
||||
|
||||
icon
|
||||
.contentShape(Rectangle())
|
||||
.simultaneousGesture(
|
||||
TapGesture()
|
||||
|
|
|
|||
Loading…
Reference in a new issue