From be124a972e11cc5624689bfd77df7f17da6baef0 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 29 Jun 2023 20:13:56 +0300 Subject: [PATCH] Prevent the TimelineController from requesting a backpagination even though items are available on the TimelineProvider level. Manually populate the items subject in the TimelineProvider constructor. --- ElementX/Sources/Services/Timeline/RoomTimelineProvider.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ElementX/Sources/Services/Timeline/RoomTimelineProvider.swift b/ElementX/Sources/Services/Timeline/RoomTimelineProvider.swift index ad2a6d37c..e04527ed0 100644 --- a/ElementX/Sources/Services/Timeline/RoomTimelineProvider.swift +++ b/ElementX/Sources/Services/Timeline/RoomTimelineProvider.swift @@ -39,6 +39,9 @@ class RoomTimelineProvider: RoomTimelineProviderProtocol { itemProxies = currentItems.map(TimelineItemProxy.init) + // Manually call it here as the didSet doesn't work from constructors + itemsSubject.send(itemProxies) + updatePublisher .collect(.byTime(serialDispatchQueue, 0.1)) .sink { [weak self] in self?.updateItemsWithDiffs($0) }