mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
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:
+1
@@ -39,6 +39,7 @@ struct DeveloperOptionsScreen: View {
|
|||||||
|
|
||||||
Toggle(isOn: $context.readReceiptsEnabled) {
|
Toggle(isOn: $context.readReceiptsEnabled) {
|
||||||
Text("Show read receipts")
|
Text("Show read receipts")
|
||||||
|
Text("requires app reboot")
|
||||||
}
|
}
|
||||||
.onChange(of: context.readReceiptsEnabled) { _ in
|
.onChange(of: context.readReceiptsEnabled) { _ in
|
||||||
context.send(viewAction: .changedReadReceiptsEnabled)
|
context.send(viewAction: .changedReadReceiptsEnabled)
|
||||||
|
|||||||
@@ -415,10 +415,15 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
|
|
||||||
// Add the visibleRoomsSlidingSyncList here so that it can take advantage of the SS builder cold cache
|
// 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
|
// We will still register the allRoomsSlidingSyncList later, and than will have no cache
|
||||||
let slidingSync = try slidingSyncBuilder
|
var slidingSyncBuilderWithExtension = slidingSyncBuilder
|
||||||
.addList(listBuilder: visibleRoomsListBuilder)
|
.addList(listBuilder: visibleRoomsListBuilder)
|
||||||
.withCommonExtensions()
|
.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
|
// Don't forget to update the view proxies after building the slidingSync
|
||||||
visibleRoomsListProxy?.setSlidingSync(slidingSync: slidingSync)
|
visibleRoomsListProxy?.setSlidingSync(slidingSync: slidingSync)
|
||||||
|
|||||||
Reference in New Issue
Block a user