This commit is contained in:
Mauro Romito
2022-12-12 15:39:57 +01:00
parent 66c20094d2
commit 133a66188b
11 changed files with 177 additions and 17 deletions
+16 -3
View File
@@ -245,9 +245,10 @@ extension RoomViewController {
}
@objc func didSendLinkAction(_ linkAction: LinkActionWrapper) {
composerLinkActionBridgePresenter = ComposerLinkActionBridgePresenter(linkAction: linkAction)
composerLinkActionBridgePresenter.delegate = self
composerLinkActionBridgePresenter.present(from: self, animated: true)
let presenter = ComposerLinkActionBridgePresenter(linkAction: linkAction)
presenter.delegate = self
composerLinkActionBridgePresenter = presenter
presenter.present(from: self, animated: true)
}
}
@@ -289,5 +290,17 @@ private extension RoomViewController {
}
extension RoomViewController: ComposerLinkActionBridgePresenterDelegate {
func didDismissInteractively() {
self.cleanup()
}
func didCancel() {
self.composerLinkActionBridgePresenter?.dismiss(animated: true) { [weak self] in
self?.cleanup()
}
}
private func cleanup() {
self.composerLinkActionBridgePresenter = nil
}
}