Switch back to the old room instead of the slidingSyncRoom for dealing with the timeline

This commit is contained in:
Stefan Ceriu
2022-11-24 17:32:30 +02:00
committed by Stefan Ceriu
parent 348f238ec8
commit ac4e641d13

View File

@@ -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<Void, RoomProxyError> {
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<Void, RoomProxyError> {