From ac4e641d131348870f151e958f05ae2bbb359d43 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 24 Nov 2022 17:32:30 +0200 Subject: [PATCH] Switch back to the old room instead of the slidingSyncRoom for dealing with the timeline --- .../Sources/Services/Room/RoomProxy.swift | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ElementX/Sources/Services/Room/RoomProxy.swift b/ElementX/Sources/Services/Room/RoomProxy.swift index 44ad3abb8..fd4b0db2b 100644 --- a/ElementX/Sources/Services/Room/RoomProxy.swift +++ b/ElementX/Sources/Services/Room/RoomProxy.swift @@ -37,7 +37,10 @@ class RoomProxy: RoomProxyProtocol { private var backPaginationOutcome: PaginationOutcome? deinit { - slidingSyncRoom.removeTimeline() + room.removeTimeline() + + #warning("We **should** use the slidingSyncRoom but it's not working properly yet") +// slidingSyncRoom.removeTimeline() } init(slidingSyncRoom: SlidingSyncRoomProtocol, @@ -142,11 +145,15 @@ class RoomProxy: RoomProxyProtocol { } func addTimelineListener(listener: TimelineListener) -> Result { - if let result = slidingSyncRoom.addTimelineListener(listener: listener), result == true { - return .success(()) - } else { - return .failure(.failedAddingTimelineListener) - } + room.addTimelineListener(listener: listener) + return .success(()) + + #warning("We **should** use the slidingSyncRoom but it's not working properly yet") +// if let result = slidingSyncRoom.addTimelineListener(listener: listener), result == true { +// return .success(()) +// } else { +// return .failure(.failedAddingTimelineListener) +// } } func paginateBackwards(count: UInt) async -> Result {