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
parent
4af93975ed
commit
d3ee3c5b8a
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue