mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-21 00:22:12 +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") {
|
if let userAccentColor = UserDefaults.standard.color(forKey: "accentColor") {
|
||||||
UIView.appearance(whenContainedInInstancesOf: [UIAlertController.self]).tintColor = userAccentColor
|
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 {
|
var body: some Scene {
|
||||||
|
|
@ -60,6 +44,21 @@ struct SoraApp: App {
|
||||||
await moduleManager.refreshModules()
|
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
|
.onOpenURL { url in
|
||||||
handleURL(url)
|
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 {
|
for i in 0..<qualityPriority.count {
|
||||||
let candidate = qualityPriority[i]
|
let candidate = qualityPriority[i]
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,8 @@ struct TabBar: View {
|
||||||
.frame(width: tabWidth)
|
.frame(width: tabWidth)
|
||||||
.opacity(isActive ? 1 : 0.5)
|
.opacity(isActive ? 1 : 0.5)
|
||||||
.scaleEffect(scale)
|
.scaleEffect(scale)
|
||||||
return icon
|
|
||||||
|
icon
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
.simultaneousGesture(
|
.simultaneousGesture(
|
||||||
TapGesture()
|
TapGesture()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue