Merge commit 'aaadcc73674cc8886e363693a7d7c08ac9b4f516' into feature/4260_merge_foss_1_10_2

# Conflicts:
#	Config/AppVersion.xcconfig
#	Podfile
#	Podfile.lock
#	Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift
#	Riot/Modules/Application/LegacyAppDelegate.m
#	Riot/Modules/Authentication/AuthenticationCoordinator.swift
#	Riot/Modules/Authentication/Legacy/LegacyAuthenticationCoordinator.swift
#	Riot/Modules/ContextMenu/ActionProviders/RoomActionProvider.swift
#	Riot/Modules/Home/AllChats/AllChatsViewController.swift
#	Riot/Modules/Room/RoomInfo/RoomInfoCoordinator.swift
#	Riot/Modules/Room/RoomInfo/RoomInfoList/RoomInfoListViewController.swift
#	Riot/Modules/Room/Settings/RoomSettingsViewController.m
#	fastlane/Fastfile
This commit is contained in:
JanNiklas Grabowski
2023-02-15 14:56:55 +01:00
279 changed files with 7285 additions and 2433 deletions
@@ -188,6 +188,14 @@ final class RoomInfoCoordinator: NSObject, RoomInfoCoordinatorType {
coordinator.start()
self.add(childCoordinator: coordinator)
self.navigationRouter.push(coordinator, animated: true, popCompletion: nil)
case .pollHistory:
let coordinator: PollHistoryCoordinator = .init(parameters: .init(mode: .active, room: room, navigationRouter: navigationRouter))
coordinator.start()
coordinator.completion = { [weak self] event in
guard let self else { return }
self.delegate?.roomInfoCoordinator(self, viewEventInTimeline: event)
}
push(coordinator: coordinator)
default:
guard let tabIndex = target.tabIndex else {
fatalError("No settings tab index for this target.")
@@ -201,6 +209,13 @@ final class RoomInfoCoordinator: NSObject, RoomInfoCoordinatorType {
navigationRouter.push(segmentedViewController, animated: animated, popCompletion: nil)
}
}
private func push(coordinator: Coordinator & Presentable, animated: Bool = true) {
self.add(childCoordinator: coordinator)
navigationRouter.push(coordinator, animated: animated) {
self.remove(childCoordinator: coordinator)
}
}
}
// MARK: - RoomInfoListCoordinatorDelegate
@@ -17,12 +17,14 @@
*/
import Foundation
import MatrixSDK
@objc protocol RoomInfoCoordinatorBridgePresenterDelegate {
func roomInfoCoordinatorBridgePresenterDelegateDidComplete(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter)
func roomInfoCoordinatorBridgePresenter(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter, didRequestMentionForMember member: MXRoomMember)
func roomInfoCoordinatorBridgePresenterDelegateDidLeaveRoom(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter)
func roomInfoCoordinatorBridgePresenter(_ coordinatorBridgePresenter: RoomInfoCoordinatorBridgePresenter, didReplaceRoomWithReplacementId roomId: String)
func roomInfoCoordinatorBridgePresenter(_ coordinator: RoomInfoCoordinatorBridgePresenter, viewEventInTimeline event: MXEvent)
}
/// RoomInfoCoordinatorBridgePresenter enables to start RoomInfoCoordinator from a view controller.
@@ -129,6 +131,9 @@ extension RoomInfoCoordinatorBridgePresenter: RoomInfoCoordinatorDelegate {
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didReplaceRoomWithReplacementId roomId: String) {
self.delegate?.roomInfoCoordinatorBridgePresenter(self, didReplaceRoomWithReplacementId: roomId)
}
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, viewEventInTimeline event: MXEvent) {
self.delegate?.roomInfoCoordinatorBridgePresenter(self, viewEventInTimeline: event)
}
}
// MARK: - UIAdaptivePresentationControllerDelegate
@@ -17,12 +17,14 @@
*/
import Foundation
import MatrixSDK
protocol RoomInfoCoordinatorDelegate: AnyObject {
func roomInfoCoordinatorDidComplete(_ coordinator: RoomInfoCoordinatorType)
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didRequestMentionForMember member: MXRoomMember)
func roomInfoCoordinatorDidLeaveRoom(_ coordinator: RoomInfoCoordinatorType)
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, didReplaceRoomWithReplacementId roomId: String)
func roomInfoCoordinator(_ coordinator: RoomInfoCoordinatorType, viewEventInTimeline event: MXEvent)
}
/// `RoomInfoCoordinatorType` is a protocol describing a Coordinator that handle keybackup setup navigation flow.
@@ -28,6 +28,7 @@ enum RoomInfoListTarget: Equatable {
case search
case permalink
case notifications
case pollHistory
var tabIndex: UInt? {
switch self {
@@ -207,6 +207,9 @@ final class RoomInfoListViewController: UIViewController {
let rowUploads = Row(type: .default, icon: Asset.Images.scrollup.image, text: BWIL10n.roomDetailsFiles, accessoryType: .disclosureIndicator) {
self.viewModel.process(viewAction: .navigate(target: .uploads))
}
let rowPollHistory = Row(type: .default, icon: Asset.Images.pollHistory.image, text: VectorL10n.roomDetailsPolls, accessoryType: .disclosureIndicator) {
self.viewModel.process(viewAction: .navigate(target: .pollHistory))
}
let rowSearch = Row(type: .default, icon: Asset.Images.searchIcon.image, text: VectorL10n.roomDetailsSearch, accessoryType: .disclosureIndicator) {
self.viewModel.process(viewAction: .navigate(target: .search))
}
@@ -231,6 +234,11 @@ final class RoomInfoListViewController: UIViewController {
rows.append(rowIntegrations)
}
rows.append(rowMembers)
if BuildSettings.pollsEnabled {
rows.append(rowPollHistory)
}
rows.append(rowUploads)
if BWIBuildSettings.shared.bwiShowRoomSearch {