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:
Stefan Ceriu
2026-03-23 17:55:50 +02:00
committed by Stefan Ceriu
parent e97ed6ec5c
commit e7e1e990db
16 changed files with 413 additions and 8 deletions
@@ -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() }