mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Remove Read Receipts Feature Flag (#2228)
This commit is contained in:
@@ -44,7 +44,6 @@ final class AppSettings {
|
|||||||
// Feature flags
|
// Feature flags
|
||||||
case shouldCollapseRoomStateEvents
|
case shouldCollapseRoomStateEvents
|
||||||
case userSuggestionsEnabled
|
case userSuggestionsEnabled
|
||||||
case readReceiptsEnabled
|
|
||||||
case swiftUITimelineEnabled
|
case swiftUITimelineEnabled
|
||||||
case chatBackupEnabled
|
case chatBackupEnabled
|
||||||
}
|
}
|
||||||
@@ -265,9 +264,6 @@ final class AppSettings {
|
|||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.userSuggestionsEnabled, defaultValue: false, storageType: .volatile)
|
@UserPreference(key: UserDefaultsKeys.userSuggestionsEnabled, defaultValue: false, storageType: .volatile)
|
||||||
var userSuggestionsEnabled
|
var userSuggestionsEnabled
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.readReceiptsEnabled, defaultValue: true, storageType: .userDefaults(store))
|
|
||||||
var readReceiptsEnabled
|
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.swiftUITimelineEnabled, defaultValue: false, storageType: .volatile)
|
@UserPreference(key: UserDefaultsKeys.swiftUITimelineEnabled, defaultValue: false, storageType: .volatile)
|
||||||
var swiftUITimelineEnabled
|
var swiftUITimelineEnabled
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ struct RoomScreenViewState: BindableState {
|
|||||||
var members: [String: RoomMemberState] = [:]
|
var members: [String: RoomMemberState] = [:]
|
||||||
var showLoading = false
|
var showLoading = false
|
||||||
var timelineStyle: TimelineStyle
|
var timelineStyle: TimelineStyle
|
||||||
var readReceiptsEnabled: Bool
|
|
||||||
var isEncryptedOneToOneRoom = false
|
var isEncryptedOneToOneRoom = false
|
||||||
var timelineViewState = TimelineViewState() // check the doc before changing this
|
var timelineViewState = TimelineViewState() // check the doc before changing this
|
||||||
var swiftUITimelineEnabled = false
|
var swiftUITimelineEnabled = false
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
|||||||
roomTitle: roomProxy.roomTitle,
|
roomTitle: roomProxy.roomTitle,
|
||||||
roomAvatarURL: roomProxy.avatarURL,
|
roomAvatarURL: roomProxy.avatarURL,
|
||||||
timelineStyle: appSettings.timelineStyle,
|
timelineStyle: appSettings.timelineStyle,
|
||||||
readReceiptsEnabled: appSettings.readReceiptsEnabled,
|
|
||||||
isEncryptedOneToOneRoom: roomProxy.isEncryptedOneToOneRoom,
|
isEncryptedOneToOneRoom: roomProxy.isEncryptedOneToOneRoom,
|
||||||
ownUserID: roomProxy.ownUserID,
|
ownUserID: roomProxy.ownUserID,
|
||||||
hasOngoingCall: roomProxy.hasOngoingCall,
|
hasOngoingCall: roomProxy.hasOngoingCall,
|
||||||
@@ -315,10 +314,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
|||||||
appSettings.$timelineStyle
|
appSettings.$timelineStyle
|
||||||
.weakAssign(to: \.state.timelineStyle, on: self)
|
.weakAssign(to: \.state.timelineStyle, on: self)
|
||||||
.store(in: &cancellables)
|
.store(in: &cancellables)
|
||||||
|
|
||||||
appSettings.$readReceiptsEnabled
|
|
||||||
.weakAssign(to: \.state.readReceiptsEnabled, on: self)
|
|
||||||
.store(in: &cancellables)
|
|
||||||
|
|
||||||
roomProxy.members
|
roomProxy.members
|
||||||
.map { members in
|
.map { members in
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ struct RoomScreen: View {
|
|||||||
.id(context.viewState.roomID)
|
.id(context.viewState.roomID)
|
||||||
.environmentObject(context)
|
.environmentObject(context)
|
||||||
.environment(\.timelineStyle, context.viewState.timelineStyle)
|
.environment(\.timelineStyle, context.viewState.timelineStyle)
|
||||||
.environment(\.readReceiptsEnabled, context.viewState.readReceiptsEnabled)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
|||||||
@@ -399,9 +399,6 @@ struct TimelineItemBubbledStylerView_Previews: PreviewProvider, TestablePreview
|
|||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
mockTimeline
|
mockTimeline
|
||||||
.previewDisplayName("Mock Timeline")
|
.previewDisplayName("Mock Timeline")
|
||||||
mockTimeline
|
|
||||||
.environment(\.readReceiptsEnabled, true)
|
|
||||||
.previewDisplayName("Mock Timeline with read receipts")
|
|
||||||
mockTimeline
|
mockTimeline
|
||||||
.environment(\.layoutDirection, .rightToLeft)
|
.environment(\.layoutDirection, .rightToLeft)
|
||||||
.previewDisplayName("Mock Timeline RTL")
|
.previewDisplayName("Mock Timeline RTL")
|
||||||
|
|||||||
@@ -82,9 +82,4 @@ extension EnvironmentValues {
|
|||||||
get { self[TimelineGroupStyleKey.self] }
|
get { self[TimelineGroupStyleKey.self] }
|
||||||
set { self[TimelineGroupStyleKey.self] = newValue }
|
set { self[TimelineGroupStyleKey.self] = newValue }
|
||||||
}
|
}
|
||||||
|
|
||||||
var readReceiptsEnabled: Bool {
|
|
||||||
get { self[ReadReceiptsEnabledKey.self] }
|
|
||||||
set { self[ReadReceiptsEnabledKey.self] = newValue }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ struct TimelineItemStatusView: View {
|
|||||||
let timelineItem: EventBasedTimelineItemProtocol
|
let timelineItem: EventBasedTimelineItemProtocol
|
||||||
let adjustedDeliveryStatus: TimelineItemDeliveryStatus?
|
let adjustedDeliveryStatus: TimelineItemDeliveryStatus?
|
||||||
@Environment(\.timelineStyle) private var style
|
@Environment(\.timelineStyle) private var style
|
||||||
@Environment(\.readReceiptsEnabled) private var readReceiptsEnabled
|
|
||||||
@EnvironmentObject private var context: RoomScreenViewModel.Context
|
@EnvironmentObject private var context: RoomScreenViewModel.Context
|
||||||
|
|
||||||
private var isLastOutgoingMessage: Bool {
|
private var isLastOutgoingMessage: Bool {
|
||||||
@@ -34,7 +33,7 @@ struct TimelineItemStatusView: View {
|
|||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var mainContent: some View {
|
private var mainContent: some View {
|
||||||
if !timelineItem.properties.orderedReadReceipts.isEmpty, readReceiptsEnabled {
|
if !timelineItem.properties.orderedReadReceipts.isEmpty {
|
||||||
readReceipts
|
readReceipts
|
||||||
} else {
|
} else {
|
||||||
deliveryStatusBadge
|
deliveryStatusBadge
|
||||||
|
|||||||
-1
@@ -47,7 +47,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
|||||||
var otlpTracingEnabled: Bool { get set }
|
var otlpTracingEnabled: Bool { get set }
|
||||||
var shouldCollapseRoomStateEvents: Bool { get set }
|
var shouldCollapseRoomStateEvents: Bool { get set }
|
||||||
var userSuggestionsEnabled: Bool { get set }
|
var userSuggestionsEnabled: Bool { get set }
|
||||||
var readReceiptsEnabled: Bool { get set }
|
|
||||||
var swiftUITimelineEnabled: Bool { get set }
|
var swiftUITimelineEnabled: Bool { get set }
|
||||||
var chatBackupEnabled: Bool { get set }
|
var chatBackupEnabled: Bool { get set }
|
||||||
|
|
||||||
|
|||||||
-5
@@ -43,11 +43,6 @@ struct DeveloperOptionsScreen: View {
|
|||||||
Toggle(isOn: $context.shouldCollapseRoomStateEvents) {
|
Toggle(isOn: $context.shouldCollapseRoomStateEvents) {
|
||||||
Text("Collapse room state events")
|
Text("Collapse room state events")
|
||||||
}
|
}
|
||||||
|
|
||||||
Toggle(isOn: $context.readReceiptsEnabled) {
|
|
||||||
Text("Show read receipts")
|
|
||||||
Text("Requires app reboot")
|
|
||||||
}
|
|
||||||
|
|
||||||
Toggle(isOn: $context.swiftUITimelineEnabled) {
|
Toggle(isOn: $context.swiftUITimelineEnabled) {
|
||||||
Text("SwiftUI Timeline")
|
Text("SwiftUI Timeline")
|
||||||
|
|||||||
@@ -388,7 +388,6 @@ class MockScreen: Identifiable {
|
|||||||
navigationStackCoordinator.setRootCoordinator(coordinator)
|
navigationStackCoordinator.setRootCoordinator(coordinator)
|
||||||
return navigationStackCoordinator
|
return navigationStackCoordinator
|
||||||
case .roomSmallTimelineWithReadReceipts:
|
case .roomSmallTimelineWithReadReceipts:
|
||||||
ServiceLocator.shared.settings.readReceiptsEnabled = true
|
|
||||||
let navigationStackCoordinator = NavigationStackCoordinator()
|
let navigationStackCoordinator = NavigationStackCoordinator()
|
||||||
let timelineController = MockRoomTimelineController()
|
let timelineController = MockRoomTimelineController()
|
||||||
timelineController.timelineItems = RoomTimelineItemFixtures.smallChunkWithReadReceipts
|
timelineController.timelineItems = RoomTimelineItemFixtures.smallChunkWithReadReceipts
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:5d9b24eabfe1a1e9b20e073a54b502fe2dd931888bbdfc0f9e3f80daf47da086
|
oid sha256:ad878b38347d644944ca7b9f77bc62f69ec8243de0b9f2b6b8b9291eecc82309
|
||||||
size 340654
|
size 338034
|
||||||
|
|||||||
-3
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:cd888b282323ffde3f179aaa9b30239e1801bc0afb7af1f7b3f6410b42e62583
|
|
||||||
size 337169
|
|
||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:b90380fb1e7089bf7d47cab12667adbce4249b2ec78b4eb112f0b244cbe3d72e
|
oid sha256:cd888b282323ffde3f179aaa9b30239e1801bc0afb7af1f7b3f6410b42e62583
|
||||||
size 339386
|
size 337169
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:b26642d6f01ae553147d66e347da12469ea642a1fa27f70ed802a703f27f54af
|
oid sha256:1063dd5c24689278e9adb10af716a3d40bcd78e0371a02669f97cfd470185224
|
||||||
size 370905
|
size 377469
|
||||||
|
|||||||
Reference in New Issue
Block a user