macos: update permission request response should move state back to idle (#9151)

Previously, the permission request response would not move the state so
it'd stay in the titlebar.
This commit is contained in:
Mitchell Hashimoto
2025-10-11 14:49:31 -07:00
committed by GitHub
parent 4af93975ed
commit d3ee3c5b8a

View File

@@ -39,7 +39,10 @@ class UpdateDriver: NSObject, SPUUserDriver {
func show(_ request: SPUUpdatePermissionRequest,
reply: @escaping @Sendable (SUUpdatePermissionResponse) -> Void) {
viewModel.state = .permissionRequest(.init(request: request, reply: reply))
viewModel.state = .permissionRequest(.init(request: request, reply: { [weak viewModel] response in
viewModel?.state = .idle
reply(response)
}))
if !hasUnobtrusiveTarget {
standard.show(request, reply: reply)
}