Skip to content

Commit

Permalink
Make AccessibilityIdentifier.wireGuardPort tagged with its value
Browse files Browse the repository at this point in the history
  • Loading branch information
acb-mv committed Dec 9, 2024
1 parent 9aa969b commit b6031ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public enum AccessibilityIdentifier: Equatable {
case wireGuardObfuscationOff
case wireGuardObfuscationUdpOverTcp
case wireGuardObfuscationShadowsocks
case wireGuardPort
case wireGuardPort(UInt16?)
case udpOverTcpObfuscationSettings

// Custom DNS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ final class VPNSettingsCellFactory: CellFactoryProtocol {
}

cell.titleLabel.text = portString
// TODO: replace this with a tagged AccessibilityIdentifier
cell.accessibilityIdentifier = "\(item.accessibilityIdentifier.asString) (\(portString))"
cell.accessibilityIdentifier = "\(item.accessibilityIdentifier.asString)"
cell.applySubCellStyling()

case .wireGuardCustomPort:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource<
return .dnsSettings
case .ipOverrides:
return .ipOverrides
case .wireGuardPort:
return .wireGuardPort
case let .wireGuardPort(port):
return .wireGuardPort(port)
case .wireGuardCustomPort:
return .wireGuardCustomPort
case .wireGuardObfuscationAutomatic:
Expand Down

0 comments on commit b6031ed

Please sign in to comment.