mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Remove encryption authenticity feature flag. (#3180)
This commit is contained in:
parent
4e66788321
commit
6616d1799f
@ -47,7 +47,6 @@ final class AppSettings {
|
||||
case publicSearchEnabled
|
||||
case fuzzyRoomListSearchEnabled
|
||||
case pinningEnabled
|
||||
case timelineItemAuthenticityEnabled
|
||||
}
|
||||
|
||||
private static var suiteName: String = InfoPlistReader.main.appGroupIdentifier
|
||||
@ -286,9 +285,6 @@ final class AppSettings {
|
||||
@UserPreference(key: UserDefaultsKeys.pinningEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var pinningEnabled
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.timelineItemAuthenticityEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var timelineItemAuthenticityEnabled
|
||||
|
||||
// Not user configurable as it depends on work in EC too.
|
||||
let elementCallPictureInPictureEnabled = false
|
||||
|
||||
|
@ -562,7 +562,6 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
let userID = userSession.clientProxy.userID
|
||||
|
||||
let timelineItemFactory = RoomTimelineItemFactory(userID: userID,
|
||||
encryptionAuthenticityEnabled: appSettings.timelineItemAuthenticityEnabled,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
stateEventStringBuilder: RoomStateEventStringBuilder(userID: userID))
|
||||
|
||||
@ -968,7 +967,6 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
private func presentPinnedEventsTimeline() async {
|
||||
let userID = userSession.clientProxy.userID
|
||||
let timelineItemFactory = RoomTimelineItemFactory(userID: userID,
|
||||
encryptionAuthenticityEnabled: appSettings.timelineItemAuthenticityEnabled,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
stateEventStringBuilder: RoomStateEventStringBuilder(userID: userID))
|
||||
|
||||
@ -1098,7 +1096,6 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
let userID = userSession.clientProxy.userID
|
||||
|
||||
let timelineItemFactory = RoomTimelineItemFactory(userID: userID,
|
||||
encryptionAuthenticityEnabled: appSettings.timelineItemAuthenticityEnabled,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
stateEventStringBuilder: RoomStateEventStringBuilder(userID: userID))
|
||||
|
||||
|
@ -53,7 +53,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
||||
var elementCallBaseURLOverride: URL? { get set }
|
||||
var fuzzyRoomListSearchEnabled: Bool { get set }
|
||||
var pinningEnabled: Bool { get set }
|
||||
var timelineItemAuthenticityEnabled: Bool { get set }
|
||||
}
|
||||
|
||||
extension AppSettings: DeveloperOptionsProtocol { }
|
||||
|
@ -51,13 +51,6 @@ struct DeveloperOptionsScreen: View {
|
||||
}
|
||||
}
|
||||
|
||||
Section("Encryption") {
|
||||
Toggle(isOn: $context.timelineItemAuthenticityEnabled) {
|
||||
Text("Message authenticity warnings")
|
||||
Text("Requires app reboot")
|
||||
}
|
||||
}
|
||||
|
||||
Section("Element Call") {
|
||||
TextField(context.viewState.elementCallBaseURL.absoluteString, text: $elementCallBaseURLString)
|
||||
.submitLabel(.done)
|
||||
|
@ -24,14 +24,11 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
|
||||
/// The Matrix ID of the current user.
|
||||
private let userID: String
|
||||
private let encryptionAuthenticityEnabled: Bool
|
||||
|
||||
init(userID: String,
|
||||
encryptionAuthenticityEnabled: Bool,
|
||||
attributedStringBuilder: AttributedStringBuilderProtocol,
|
||||
stateEventStringBuilder: RoomStateEventStringBuilder) {
|
||||
self.userID = userID
|
||||
self.encryptionAuthenticityEnabled = encryptionAuthenticityEnabled
|
||||
self.attributedStringBuilder = attributedStringBuilder
|
||||
self.stateEventStringBuilder = stateEventStringBuilder
|
||||
}
|
||||
@ -503,8 +500,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
}
|
||||
|
||||
private func authenticity(_ shieldState: ShieldState?) -> EncryptionAuthenticity? {
|
||||
guard encryptionAuthenticityEnabled else { return nil }
|
||||
return shieldState.flatMap(EncryptionAuthenticity.init)
|
||||
shieldState.flatMap(EncryptionAuthenticity.init)
|
||||
}
|
||||
|
||||
// MARK: - Message events content
|
||||
|
@ -637,7 +637,6 @@ class MockScreen: Identifiable {
|
||||
timelineProxy: roomProxy.timeline,
|
||||
initialFocussedEventID: nil,
|
||||
timelineItemFactory: RoomTimelineItemFactory(userID: "@alice:matrix.org",
|
||||
encryptionAuthenticityEnabled: true,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
stateEventStringBuilder: RoomStateEventStringBuilder(userID: "@alice:matrix.org")),
|
||||
appSettings: ServiceLocator.shared.settings)
|
||||
|
@ -24,7 +24,6 @@ class TimelineItemFactoryTests: XCTestCase {
|
||||
let senderUserID = "@bob:matrix.org"
|
||||
|
||||
let factory = RoomTimelineItemFactory(userID: ownUserID,
|
||||
encryptionAuthenticityEnabled: true,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
stateEventStringBuilder: RoomStateEventStringBuilder(userID: ownUserID))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user