Join room loading indicators

This commit is contained in:
Andy Uhnak
2022-03-23 16:26:44 +00:00
parent 726030a04b
commit a783227e64
20 changed files with 287 additions and 265 deletions
@@ -132,6 +132,7 @@ final class ThreadsCoordinator: NSObject, ThreadsCoordinatorProtocol {
private func createThreadCoordinator(forThreadId threadId: String) -> RoomCoordinator {
let parameters = RoomCoordinatorParameters(navigationRouter: navigationRouter,
navigationRouterStore: nil,
userIndicatorPresenter: parameters.userIndicatorPresenter,
session: parameters.session,
parentSpaceId: nil,
roomId: parameters.roomId,
@@ -47,6 +47,7 @@ final class ThreadsCoordinatorBridgePresenter: NSObject {
private let session: MXSession
private let roomId: String
private let threadId: String?
private let userIndicatorPresenter: UserIndicatorTypePresenterProtocol
private var navigationType: NavigationType = .present
private var coordinator: ThreadsCoordinator?
@@ -63,10 +64,12 @@ final class ThreadsCoordinatorBridgePresenter: NSObject {
/// - threadId: Thread identifier. Specified thread will be opened if provided, the thread list otherwise
init(session: MXSession,
roomId: String,
threadId: String?) {
threadId: String?,
userIndicatorPresenter: UserIndicatorTypePresenterProtocol) {
self.session = session
self.roomId = roomId
self.threadId = threadId
self.userIndicatorPresenter = userIndicatorPresenter
super.init()
}
@@ -81,7 +84,8 @@ final class ThreadsCoordinatorBridgePresenter: NSObject {
let threadsCoordinatorParameters = ThreadsCoordinatorParameters(session: self.session,
roomId: self.roomId,
threadId: self.threadId)
threadId: self.threadId,
userIndicatorPresenter: userIndicatorPresenter)
let threadsCoordinator = ThreadsCoordinator(parameters: threadsCoordinatorParameters)
threadsCoordinator.delegate = self
@@ -100,6 +104,7 @@ final class ThreadsCoordinatorBridgePresenter: NSObject {
let threadsCoordinatorParameters = ThreadsCoordinatorParameters(session: self.session,
roomId: self.roomId,
threadId: self.threadId,
userIndicatorPresenter: userIndicatorPresenter,
navigationRouter: navigationRouter)
let threadsCoordinator = ThreadsCoordinator(parameters: threadsCoordinatorParameters)
@@ -33,13 +33,17 @@ struct ThreadsCoordinatorParameters {
/// The navigation router that manage physical navigation
let navigationRouter: NavigationRouterType
let userIndicatorPresenter: UserIndicatorTypePresenterProtocol
init(session: MXSession,
roomId: String,
threadId: String?,
userIndicatorPresenter: UserIndicatorTypePresenterProtocol,
navigationRouter: NavigationRouterType? = nil) {
self.session = session
self.roomId = roomId
self.threadId = threadId
self.userIndicatorPresenter = userIndicatorPresenter
self.navigationRouter = navigationRouter ?? NavigationRouter(navigationController: RiotNavigationController())
}
}