From dbee85a92968be140549f8e0e39420d208f53699 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 31 Aug 2023 09:54:07 +0300 Subject: [PATCH] Prevent the timeline from jumping whenever a room is entered - caused by https://github.com/matrix-org/matrix-rust-sdk/issues/2488 - rolled back to a solution similar to what we had before --- ElementX/Sources/Services/Room/RoomProxy.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ElementX/Sources/Services/Room/RoomProxy.swift b/ElementX/Sources/Services/Room/RoomProxy.swift index d02996670..788b827ee 100644 --- a/ElementX/Sources/Services/Room/RoomProxy.swift +++ b/ElementX/Sources/Services/Room/RoomProxy.swift @@ -99,6 +99,10 @@ class RoomProxy: RoomProxyProtocol { let timelineListener = RoomTimelineListener { [weak self] timelineDiffs in self?.timelineUpdatesSubject.send(timelineDiffs) + + // Workaround for subscribeToRoomStateUpdates creating problems in the timeline + // https://github.com/matrix-org/matrix-rust-sdk/issues/2488 + self?.stateUpdatesSubject.send() } self.timelineListener = timelineListener @@ -108,7 +112,7 @@ class RoomProxy: RoomProxyProtocol { subscribeToBackpagination() - subscribeToRoomStateUpdates() + // subscribeToRoomStateUpdates() innerTimelineProvider = await RoomTimelineProvider(currentItems: result.items, updatePublisher: timelineUpdatesSubject.eraseToAnyPublisher(),