mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-27 19:17:13 +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) {
|
func updater(_ updater: SPUUpdater, didAbortWithError error: Error) {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.isChecking = false
|
|
||||||
let nsError = error as NSError
|
let nsError = error as NSError
|
||||||
if nsError.domain == "SUSparkleErrorDomain" && nsError.code == 1002 {
|
if nsError.domain == "SUSparkleErrorDomain" && nsError.code == 1001 {
|
||||||
// SUNoUpdateError, handled by updaterDidNotFindUpdate
|
// SUNoUpdateError (1001), handled by updaterDidNotFindUpdate
|
||||||
} else {
|
return
|
||||||
self.updateStatus = "Update check failed: \(error.localizedDescription)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.isChecking = false
|
||||||
|
self.updateStatus = "Update check failed: \(error.localizedDescription)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user