Disable RR extension when feature flag is off (#1068)

* disable rr extension according to ff

* fixed typos in the code
This commit is contained in:
Mauro
2023-06-12 12:59:01 +02:00
committed by GitHub
parent 0f358a6b2d
commit 94c97ec7e9
2 changed files with 8 additions and 2 deletions
@@ -415,10 +415,15 @@ class ClientProxy: ClientProxyProtocol {
// Add the visibleRoomsSlidingSyncList here so that it can take advantage of the SS builder cold cache
// We will still register the allRoomsSlidingSyncList later, and than will have no cache
let slidingSync = try slidingSyncBuilder
var slidingSyncBuilderWithExtension = slidingSyncBuilder
.addList(listBuilder: visibleRoomsListBuilder)
.withCommonExtensions()
.build()
if !ServiceLocator.shared.settings.readReceiptsEnabled {
slidingSyncBuilderWithExtension = slidingSyncBuilderWithExtension.withoutReceiptExtension()
}
let slidingSync = try slidingSyncBuilderWithExtension.build()
// Don't forget to update the view proxies after building the slidingSync
visibleRoomsListProxy?.setSlidingSync(slidingSync: slidingSync)