updated onClick

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-09-14 16:02:15 -05:00
parent c2cc637c38
commit 34d3386d36

View File

@ -50,14 +50,13 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{
//setup action //setup action
if let action = viewModel.action { if let action = viewModel.action {
//add the subscriber //add the subscriber
onClickSubscriber = publisher(for: .touchUpInside) onClick = { [weak self] control in
.sink {[weak self] control in guard let self, let viewModel = self.viewModel else { return }
guard let self else { return } MVMCoreUIActionHandler.performActionUnstructured(with: action,
MVMCoreUIActionHandler.performActionUnstructured(with: action, sourceModel: viewModel,
sourceModel: self.viewModel, additionalData: self.additionalData,
additionalData: self.additionalData, delegateObject: self.delegateObject)
delegateObject: self.delegateObject) }
}
} }
} }