mirror of
https://github.com/nimbold/Firelink.git
synced 2026-07-26 12:08:27 +00:00
fix: correct Sparkle SUNoUpdateError code to prevent false error messages
This commit is contained in:
@@ -40,13 +40,14 @@ final class SparkleUpdater: NSObject, ObservableObject, SPUUpdaterDelegate {
|
||||
|
||||
func updater(_ updater: SPUUpdater, didAbortWithError error: Error) {
|
||||
DispatchQueue.main.async {
|
||||
self.isChecking = false
|
||||
let nsError = error as NSError
|
||||
if nsError.domain == "SUSparkleErrorDomain" && nsError.code == 1002 {
|
||||
// SUNoUpdateError, handled by updaterDidNotFindUpdate
|
||||
} else {
|
||||
self.updateStatus = "Update check failed: \(error.localizedDescription)"
|
||||
if nsError.domain == "SUSparkleErrorDomain" && nsError.code == 1001 {
|
||||
// SUNoUpdateError (1001), handled by updaterDidNotFindUpdate
|
||||
return
|
||||
}
|
||||
|
||||
self.isChecking = false
|
||||
self.updateStatus = "Update check failed: \(error.localizedDescription)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user