Improved swifty-ness of these lines
This commit is contained in:
parent
8f23dd391c
commit
6cf4ba0594
@ -34,14 +34,11 @@ public typealias ButtonBlock = (Button) -> Void
|
||||
}
|
||||
|
||||
self.addBlock({ [weak self] (sender) in
|
||||
guard let self = self else { return }
|
||||
var performAction = true
|
||||
if let shouldPerformAction = self.buttonDelegate?.button?(self, shouldPerformActionWithMap: actionMap, additionalData: additionalData) {
|
||||
performAction = shouldPerformAction
|
||||
}
|
||||
if performAction {
|
||||
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
||||
}
|
||||
guard let self = self,
|
||||
let performAction = self.buttonDelegate?.button?(self, shouldPerformActionWithMap: actionMap, additionalData: additionalData),
|
||||
performAction else { return }
|
||||
|
||||
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
||||
|
||||
}, event: .touchUpInside)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user