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.
pull/9155/head
Mitchell Hashimoto 2025-10-11 14:49:31 -07:00 committed by GitHub
parent 4af93975ed
commit d3ee3c5b8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

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)
}