mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add a new RoomThreadListScreen and hook it up to the RoomThreadListService
It will automatically paginate to fill the screen and update the list as updates come in.
This commit is contained in:
committed by
Stefan Ceriu
parent
e97ed6ec5c
commit
e7e1e990db
@@ -720,6 +720,10 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
sendHandle: sendHandle))
|
||||
case .presentKnockRequestsList:
|
||||
stateMachine.tryEvent(.presentKnockRequestsListScreen)
|
||||
case .presentThreadList:
|
||||
Task {
|
||||
await self.presentThreadList(animated: true)
|
||||
}
|
||||
case .presentThread(let threadRootEventID, let focussedEventID):
|
||||
stateMachine.tryEvent(.presentThread(threadRootEventID: threadRootEventID, focusEventID: focussedEventID))
|
||||
case .presentRoom(let roomID, let via):
|
||||
@@ -733,6 +737,15 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
return coordinator
|
||||
}
|
||||
|
||||
private func presentThreadList(animated: Bool) async {
|
||||
let coordinator = await RoomThreadListScreenCoordinator(parameters: .init(threadListServiceProxy: roomProxy.threadListService(),
|
||||
mediaProvider: userSession.mediaProvider))
|
||||
|
||||
coordinator.actionsPublisher.sink { [weak self] _ in }.store(in: &cancellables)
|
||||
|
||||
navigationStackCoordinator.push(coordinator, animated: animated) { [weak self] in }
|
||||
}
|
||||
|
||||
private func presentThread(threadRootEventID: String, focusEventID: String?, animated: Bool) async {
|
||||
showLoadingIndicator()
|
||||
defer { hideLoadingIndicator() }
|
||||
|
||||
Reference in New Issue
Block a user