ONEAPP-3998: Convenience function to simplify the current objc-swift bridge of having two action protocols.

This commit is contained in:
Scott Pfeil 2023-06-15 12:12:03 -04:00
parent a5c5397c92
commit 53634fcaa1

View File

@ -19,3 +19,9 @@ public extension ActionDelegateProtocol {
try await MVMCoreActionHandler.shared()?.handleAction(with: model, additionalData: additionalData, delegateObject: delegateObject)
}
}
public extension MVMCoreActionDelegateProtocol {
func action(with model: ActionModelProtocol, additionalData: [AnyHashable : Any]?, delegateObject: DelegateObject?) async throws {
try await (self as? ActionDelegateProtocol)?.performAction(with: model, additionalData: additionalData, delegateObject: delegateObject)
}
}