diff --git a/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift b/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift index 8b7fc312..c87e091c 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Tilelet.swift @@ -21,12 +21,7 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{ public var viewModel: TileletModel! public var delegateObject: MVMCoreUIDelegateObject? public var additionalData: [AnyHashable: Any]? - - //even though we have a local set, others could be - //subscribing to other events, we use this one specically - //for the action so that we can ensure there is only 1 being used - private var actionSubscriber: AnyCancellable? - + //-------------------------------------------------- // MARK: - Initializers //-------------------------------------------------- @@ -52,7 +47,7 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{ //setup action if let action = viewModel.action { //add the subscriber - actionSubscriber = publisher(for: .touchUpInside) + onClickSubscriber = publisher(for: .touchUpInside) .sink {[weak self] control in guard let self else { return } MVMCoreUIActionHandler.performActionUnstructured(with: action, @@ -60,10 +55,6 @@ open class Tilelet: VDS.Tilelet, VDSMoleculeViewProtocol{ additionalData: self.additionalData, delegateObject: self.delegateObject) } - }//if there is no action but there was a subscriber, kill it - else if let actionSubscriber { - actionSubscriber.cancel() - self.actionSubscriber = nil } }