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
|
self.addBlock({ [weak self] (sender) in
|
||||||
guard let self = self else { return }
|
guard let self = self,
|
||||||
var performAction = true
|
let performAction = self.buttonDelegate?.button?(self, shouldPerformActionWithMap: actionMap, additionalData: additionalData),
|
||||||
if let shouldPerformAction = self.buttonDelegate?.button?(self, shouldPerformActionWithMap: actionMap, additionalData: additionalData) {
|
performAction else { return }
|
||||||
performAction = shouldPerformAction
|
|
||||||
}
|
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
||||||
if performAction {
|
|
||||||
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
|
||||||
}
|
|
||||||
|
|
||||||
}, event: .touchUpInside)
|
}, event: .touchUpInside)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user