macos: Sparkle notFound acknowledgement should only be called on dismiss (#9126)

This was causing the "no update found" message to never really appear in
the real world.
This commit is contained in:
Mitchell Hashimoto
2025-10-10 09:30:12 -07:00
committed by GitHub
parent 2bf9c777d7
commit 207eccffda
5 changed files with 19 additions and 9 deletions

View File

@@ -135,7 +135,7 @@ enum UpdateState: Equatable {
case permissionRequest(PermissionRequest)
case checking(Checking)
case updateAvailable(UpdateAvailable)
case notFound
case notFound(NotFound)
case error(Error)
case downloading(Downloading)
case extracting(Extracting)
@@ -157,6 +157,8 @@ enum UpdateState: Equatable {
downloading.cancel()
case .readyToInstall(let ready):
ready.reply(.dismiss)
case .notFound(let notFound):
notFound.acknowledgement()
case .error(let err):
err.dismiss()
default:
@@ -191,6 +193,10 @@ enum UpdateState: Equatable {
}
}
struct NotFound {
let acknowledgement: () -> Void
}
struct PermissionRequest {
let request: SPUUpdatePermissionRequest
let reply: @Sendable (SUUpdatePermissionResponse) -> Void