diff --git a/VDS/Components/Modal/ModalDialogViewController.swift b/VDS/Components/Modal/ModalDialogViewController.swift index ba113b52..4d29a91f 100644 --- a/VDS/Components/Modal/ModalDialogViewController.swift +++ b/VDS/Components/Modal/ModalDialogViewController.swift @@ -81,13 +81,11 @@ open class ModalDialogViewController: UIViewController, Surfaceable { }.store(in: &subscribers) //clicking button - onClickSubscriber = modalDialog.closeButton.publisher(for: .touchUpInside) + onClickSubscriber = modalDialog.closeCrossButton.publisher(for: .touchUpInside) .sink {[weak self] button in guard let self else { return } self.dismiss() } - - modalDialog.closeCrossButton.onClick = { _ in self.dismiss() } view.addSubview(modalDialog)