Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zmian committed Feb 12, 2024
1 parent 2946d6c commit d3b5e02
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extension MFMailComposeViewController: MFMailComposeViewControllerDelegate {
didFinishWith result: MFMailComposeResult,
error: Error?
) {
if let actionHandler = actionHandlerWrapper?.handler {
if let actionHandler = actionHandler?.handler {
let value = error.map(Result.failure) ?? .success(result)
actionHandler(controller, value)
}
Expand Down Expand Up @@ -41,7 +41,7 @@ extension MFMailComposeViewController {
static var shouldAutoDismiss = "shouldAutoDismiss"
}

private var actionHandlerWrapper: ClosureWrapper? {
private var actionHandler: ClosureWrapper? {
get { associatedObject(&AssociatedKey.actionHandler) }
set { setAssociatedObject(&AssociatedKey.actionHandler, value: newValue) }
}
Expand All @@ -56,6 +56,6 @@ extension MFMailComposeViewController {

public func didFinishWithResult(_ handler: @escaping Handler) {
mailComposeDelegate = self
actionHandlerWrapper = ClosureWrapper(handler)
actionHandler = ClosureWrapper(handler)
}
}

0 comments on commit d3b5e02

Please sign in to comment.