Introduce the RoomThreadListServiceProxy and expose it from the RoomProxy

Also update the sdk and app mocks and add a simple `RoomThreadListServiceProxyMock`

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj
#	ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	SDKMocks/Sources/Generated/SDKGeneratedMocks.swift
#	project.yml
This commit is contained in:
Stefan Ceriu
2026-03-23 17:43:38 +02:00
committed by Stefan Ceriu
parent 823e2afa97
commit e97ed6ec5c
10 changed files with 377 additions and 24 deletions
@@ -16,6 +16,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
private let room: RoomProtocol
private let appSettings: AppSettings
private let analyticsService: AnalyticsService
private let eventStringBuilder: RoomEventStringBuilder
// periphery:ignore - required for instance retention in the rust codebase
private var roomInfoObservationToken: TaskHandle?
@@ -78,11 +79,13 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
init(roomListService: RoomListServiceProtocol,
room: RoomProtocol,
appSettings: AppSettings,
analyticsService: AnalyticsService) async throws {
analyticsService: AnalyticsService,
eventStringBuilder: RoomEventStringBuilder) async throws {
self.roomListService = roomListService
self.room = room
self.appSettings = appSettings
self.analyticsService = analyticsService
self.eventStringBuilder = eventStringBuilder
infoSubject = try await .init(RoomInfoProxy(roomInfo: room.roomInfo()))
@@ -200,6 +203,10 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
}
}
func threadListService() async -> RoomThreadListServiceProxyProtocol {
await RoomThreadListProxy(threadListService: room.threadListService(), eventStringBuilder: eventStringBuilder)
}
func loadOrFetchEventDetails(for eventID: String) async -> Result<TimelineEvent, RoomProxyError> {
do {
let event = try await room.loadOrFetchEvent(eventId: eventID)