added executeAction helper method
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
f6a29a734c
commit
2e1bb7358f
@ -66,6 +66,14 @@ extension MoleculeViewProtocol {
|
||||
set(with: model, delegateObject, additionalData)
|
||||
}
|
||||
}
|
||||
|
||||
public func executeAction<T: ButtonModelProtocol & MoleculeModelProtocol>(model: T, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
Task(priority: .userInitiated) {
|
||||
try await (delegateObject?.actionDelegate as? ActionDelegateProtocol)?.performAction(with: model.action,
|
||||
additionalData: MVMCoreUIActionHandler.add(sourceModel: model, to: additionalData),
|
||||
delegateObject: delegateObject)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Convenience Functions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user