Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

Call cancel callback when the disabled-or-denied dialog is dismissed with “OK”. #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion PermissionScope/PermissionScope.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,14 @@ typealias resultsForConfigClosure = ([PermissionResult]) -> Void
preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK".localized,
style: .cancel,
handler: nil))
handler: { action in

if let onCancel = self.onCancel {
self.getResultsForConfig({ results in
onCancel(results)
})
}
}))
alert.addAction(UIAlertAction(title: "Show me".localized,
style: .default,
handler: { action in
Expand Down