mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add support for sliding sync cold cache
This commit is contained in:
committed by
Stefan Ceriu
parent
1102580d6c
commit
92b22e19e2
@@ -94,6 +94,7 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
let slidingSync = try slidingSyncBuilder
|
let slidingSync = try slidingSyncBuilder
|
||||||
.addView(v: slidingSyncView)
|
.addView(v: slidingSyncView)
|
||||||
.withCommonExtensions()
|
.withCommonExtensions()
|
||||||
|
.coldCache(name: "ElementX")
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
self.roomSummaryProvider = RoomSummaryProvider(slidingSyncController: slidingSync,
|
self.roomSummaryProvider = RoomSummaryProvider(slidingSyncController: slidingSync,
|
||||||
|
|||||||
@@ -81,6 +81,12 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
|||||||
|
|
||||||
let weakProvider = WeakRoomSummaryProviderWrapper()
|
let weakProvider = WeakRoomSummaryProviderWrapper()
|
||||||
|
|
||||||
|
rooms = slidingSyncView.currentRoomsList().map { roomListEntry in
|
||||||
|
buildSummaryForRoomListEntry(roomListEntry)
|
||||||
|
}
|
||||||
|
|
||||||
|
roomListPublisher.send(rooms) // didSet not called from initialisers
|
||||||
|
|
||||||
weakProvider.stateUpdatePublisher
|
weakProvider.stateUpdatePublisher
|
||||||
.map(RoomSummaryProviderState.init)
|
.map(RoomSummaryProviderState.init)
|
||||||
.subscribe(statePublisher)
|
.subscribe(statePublisher)
|
||||||
|
|||||||
Reference in New Issue
Block a user