Skip to content

Commit

Permalink
Enable identity pinning violation notifications unconditionally (#3457)
Browse files Browse the repository at this point in the history
(Remove the feature flag we added when this feature seemed unstable.)
  • Loading branch information
andybalaam authored Oct 28, 2024
1 parent ed8aed6 commit 4e812f7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
4 changes: 0 additions & 4 deletions ElementX/Sources/Application/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ final class AppSettings {
case publicSearchEnabled
case fuzzyRoomListSearchEnabled
case enableOnlySignedDeviceIsolationMode
case identityPinningViolationNotificationsEnabled
case knockingEnabled
case frequentEmojisEnabled
}
Expand Down Expand Up @@ -284,9 +283,6 @@ final class AppSettings {

@UserPreference(key: UserDefaultsKeys.optimizeMediaUploads, defaultValue: false, storageType: .userDefaults(store))
var optimizeMediaUploads

@UserPreference(key: UserDefaultsKeys.identityPinningViolationNotificationsEnabled, defaultValue: isDevelopmentBuild, storageType: .userDefaults(store))
var identityPinningViolationNotificationsEnabled

@UserPreference(key: UserDefaultsKeys.knockingEnabled, defaultValue: false, storageType: .userDefaults(store))
var knockingEnabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
}
.store(in: &cancellables)

let identityStatusChangesPublisher = roomProxy.identityStatusChangesPublisher
.receive(on: DispatchQueue.main)
.filter { [weak self] _ in self?.appSettings.identityPinningViolationNotificationsEnabled ?? false }
let identityStatusChangesPublisher = roomProxy.identityStatusChangesPublisher.receive(on: DispatchQueue.main)

Task { [weak self] in
for await changes in identityStatusChangesPublisher.values {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
var optimizeMediaUploads: Bool { get set }
var enableOnlySignedDeviceIsolationMode: Bool { get set }
var elementCallBaseURLOverride: URL? { get set }
var identityPinningViolationNotificationsEnabled: Bool { get set }
var knockingEnabled: Bool { get set }
var frequentEmojisEnabled: Bool { get set }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ struct DeveloperOptionsScreen: View {
Text("Hide image & video previews")
}

Toggle(isOn: $context.identityPinningViolationNotificationsEnabled) {
Text("Identity pinning violation notifications")
}

Toggle(isOn: $context.frequentEmojisEnabled) {
Text("Show frequently used emojis")
}
Expand Down

0 comments on commit 4e812f7

Please sign in to comment.