diff --git a/Riot/Modules/Application/AppCoordinator.swift b/Riot/Modules/Application/AppCoordinator.swift index faf686738..39719a896 100755 --- a/Riot/Modules/Application/AppCoordinator.swift +++ b/Riot/Modules/Application/AppCoordinator.swift @@ -573,9 +573,6 @@ extension AppCoordinator: SplitViewCoordinatorDelegate { // MARK: - SideMenuCoordinatorDelegate extension AppCoordinator: SideMenuCoordinatorDelegate { func sideMenuCoordinator(_ coordinator: SideMenuCoordinatorType, didTapMenuItem menuItem: SideMenuItem, fromSourceView sourceView: UIView) { - if menuItem == .inviteFriends { - self.splitViewCoordinator?.presentInvitePeople() - } } } diff --git a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift index 873a6ad98..73fecc790 100644 --- a/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift +++ b/Riot/Modules/Home/AllChats/AllChatsCoordinator.swift @@ -30,11 +30,6 @@ class AllChatsCoordinatorParameters { } class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { - func presentInvitePeople() { - // - } - - // MARK: Properties // MARK: Private @@ -641,6 +636,15 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { // return versionCheckCoordinator // } + private func showInviteFriends(from sourceView: UIView?) { + // Tchap: commented because Tchap now uses Element Direct Message mechanism + + // let myUserId = self.parameters.userSessionsService.mainUserSession?.userId ?? "" + // + // let inviteFriendsPresenter = InviteFriendsPresenter() + // inviteFriendsPresenter.present(for: myUserId, from: self.navigationRouter.toPresentable(), sourceView: sourceView, animated: true) + } + private func showBugReport() { let bugReportViewController = BugReportViewController() diff --git a/Riot/Modules/SideMenu/SideMenuCoordinator.swift b/Riot/Modules/SideMenu/SideMenuCoordinator.swift index 047bd0a6a..7e7d03643 100644 --- a/Riot/Modules/SideMenu/SideMenuCoordinator.swift +++ b/Riot/Modules/SideMenu/SideMenuCoordinator.swift @@ -239,6 +239,8 @@ final class SideMenuCoordinator: NSObject, SideMenuCoordinatorType { } private func showInviteFriends(from sourceView: UIView?) { +// Tchap: commented because Tchap now uses Element Direct Message mechanism + // let myUserId = self.parameters.userSessionsService.mainUserSession?.userId ?? "" // // let inviteFriendsPresenter = InviteFriendsPresenter() diff --git a/Riot/Modules/SplitView/SplitViewCoordinator.swift b/Riot/Modules/SplitView/SplitViewCoordinator.swift index 79631fccd..141be19af 100644 --- a/Riot/Modules/SplitView/SplitViewCoordinator.swift +++ b/Riot/Modules/SplitView/SplitViewCoordinator.swift @@ -166,10 +166,6 @@ final class SplitViewCoordinator: NSObject, SplitViewCoordinatorType { func showAppStateIndicator(with text: String, icon: UIImage?) { masterCoordinator?.showAppStateIndicator(with: text, icon: icon) } - - func presentInvitePeople() { - masterCoordinator?.presentInvitePeople() - } // MARK: - Private methods diff --git a/Riot/Modules/SplitView/SplitViewCoordinatorType.swift b/Riot/Modules/SplitView/SplitViewCoordinatorType.swift index 080869e5f..cfd04ed3e 100644 --- a/Riot/Modules/SplitView/SplitViewCoordinatorType.swift +++ b/Riot/Modules/SplitView/SplitViewCoordinatorType.swift @@ -45,8 +45,4 @@ protocol SplitViewCoordinatorType: Coordinator, Presentable { /// Hide the message related to the application state currently displayed. func hideAppStateIndicator() - - // Tchap: redirect to invite people alert - /// Present invite people alert (with textField) - func presentInvitePeople() } diff --git a/Riot/Modules/TabBar/SplitViewMasterCoordinatorProtocol.swift b/Riot/Modules/TabBar/SplitViewMasterCoordinatorProtocol.swift index 1cb7825b6..d83d6fc06 100644 --- a/Riot/Modules/TabBar/SplitViewMasterCoordinatorProtocol.swift +++ b/Riot/Modules/TabBar/SplitViewMasterCoordinatorProtocol.swift @@ -46,8 +46,4 @@ protocol SplitViewMasterCoordinatorProtocol: Coordinator, SplitViewMasterPresent /// Hide the message related to the application state currently displayed. func hideAppStateIndicator() - - // Tchap: redirect to invite people alert - /// Present invite people alert (with textField) - func presentInvitePeople() } diff --git a/Riot/Modules/TabBar/TabBarCoordinator.swift b/Riot/Modules/TabBar/TabBarCoordinator.swift index 198ca5e6a..e318fe318 100644 --- a/Riot/Modules/TabBar/TabBarCoordinator.swift +++ b/Riot/Modules/TabBar/TabBarCoordinator.swift @@ -236,12 +236,6 @@ final class TabBarCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { appSateIndicator = nil } - func presentInvitePeople() { - promptUserToFillAnEmailToInvite { [weak self] email in - - } - } - // MARK: - SplitViewMasterPresentable var selectedNavigationRouter: NavigationRouterType? { @@ -260,10 +254,12 @@ final class TabBarCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { } private func showInviteFriends(from sourceView: UIView?) { - let myUserId = self.parameters.userSessionsService.mainUserSession?.userId ?? "" - - let inviteFriendsPresenter = InviteFriendsPresenter() - inviteFriendsPresenter.present(for: myUserId, from: self.navigationRouter.toPresentable(), sourceView: sourceView, animated: true) +// Tchap: commented because Tchap now uses Element Direct Message mechanism + +// let myUserId = self.parameters.userSessionsService.mainUserSession?.userId ?? "" +// +// let inviteFriendsPresenter = InviteFriendsPresenter() +// inviteFriendsPresenter.present(for: myUserId, from: self.navigationRouter.toPresentable(), sourceView: sourceView, animated: true) } private func showBugReport() { @@ -795,7 +791,7 @@ final class TabBarCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { var subMenuActions: [UIAction] = [] if BuildSettings.sideMenuShowInviteFriends { subMenuActions.append(UIAction(title: VectorL10n.inviteTo(AppInfo.current.displayName), image: UIImage(systemName: "envelope")) { [weak self] action in - self?.showInviteFriends(from: nil) + self?.showInviteFriends(from: nil) }) }