From 19c2b8ffaa2b9c457e966f0e8388a67ba2b6ef99 Mon Sep 17 00:00:00 2001 From: Andrew Bulhak Date: Thu, 14 Nov 2024 16:14:21 +0100 Subject: [PATCH] Remove settings table view cell for UDP port selection menu --- .../VPNSettings/VPNSettingsCellFactory.swift | 13 ------------- .../VPNSettings/VPNSettingsDataSource.swift | 17 +---------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift index 1fe60481d83d..526fb1c16c8c 100644 --- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift +++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift @@ -66,19 +66,6 @@ final class VPNSettingsCellFactory: CellFactoryProtocol { cell.disclosureType = .chevron cell.accessibilityIdentifier = item.accessibilityIdentifier - case .udpOverTcpObfuscationSettings: - guard let cell = cell as? SettingsCell else { return } - - cell.titleLabel.text = NSLocalizedString( - "UDP_TCP_OBFUSCATION_CELL_LABEL", - tableName: "VPNSettings", - value: "UDP-over-TCP", - comment: "" - ) - - cell.disclosureType = .chevron - cell.accessibilityIdentifier = item.accessibilityIdentifier - case let .wireGuardPort(port): guard let cell = cell as? SelectableSettingsCell else { return } diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift index 302eb28a3070..d07110c6d84a 100644 --- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift +++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift @@ -22,7 +22,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< case wireGuardCustomPort case wireGuardObfuscation case wireGuardObfuscationOption - case udpOverTcpObfuscationSettings case wireGuardObfuscationPort case quantumResistance case multihop @@ -41,8 +40,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< return SelectableSettingsDetailsCell.self case .wireGuardObfuscation: return SelectableSettingsCell.self - case .udpOverTcpObfuscationSettings: - return SettingsCell.self case .wireGuardObfuscationPort: return SelectableSettingsCell.self case .quantumResistance: @@ -68,7 +65,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< case ipOverrides case wireGuardPorts case wireGuardObfuscation - case udpOverTcpObfuscationSettings case quantumResistance case privacyAndSecurity } @@ -78,7 +74,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< case ipOverrides case wireGuardPort(_ port: UInt16?) case wireGuardCustomPort - case udpOverTcpObfuscationSettings case wireGuardObfuscationAutomatic case wireGuardObfuscationUdpOverTcp case wireGuardObfuscationShadowsocks @@ -132,8 +127,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< return .wireGuardPort case .wireGuardCustomPort: return .wireGuardCustomPort - case .udpOverTcpObfuscationSettings: - return .udpOverTcpObfuscationSettings case .wireGuardObfuscationAutomatic: return .wireGuardObfuscationAutomatic case .wireGuardObfuscationUdpOverTcp: @@ -165,8 +158,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< return .wireGuardPort case .wireGuardCustomPort: return .wireGuardCustomPort - case .udpOverTcpObfuscationSettings: - return .udpOverTcpObfuscationSettings case .wireGuardObfuscationAutomatic, .wireGuardObfuscationOff: return .wireGuardObfuscation case .wireGuardObfuscationUdpOverTcp, .wireGuardObfuscationShadowsocks: @@ -318,10 +309,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< case .wireGuardCustomPort: getCustomPortCell()?.textField.becomeFirstResponder() - case .udpOverTcpObfuscationSettings: - tableView.deselectRow(at: indexPath, animated: false) - delegate?.showDetails(for: .udpOverTcp) - case .wireGuardObfuscationAutomatic: selectObfuscationState(.automatic) delegate?.didUpdateTunnelSettings(TunnelSettingsUpdate.obfuscation(obfuscationSettings)) @@ -400,7 +387,7 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< let sectionIdentifier = snapshot().sectionIdentifiers[section] switch sectionIdentifier { - case .dnsSettings, .ipOverrides, .privacyAndSecurity, .udpOverTcpObfuscationSettings: + case .dnsSettings, .ipOverrides, .privacyAndSecurity: return .leastNonzeroMagnitude default: return tableView.estimatedRowHeight @@ -458,8 +445,6 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource< snapshot.appendSections(Section.allCases) snapshot.appendItems([.dnsSettings], toSection: .dnsSettings) snapshot.appendItems([.ipOverrides], toSection: .ipOverrides) - snapshot.appendItems([.udpOverTcpObfuscationSettings], toSection: .udpOverTcpObfuscationSettings) - snapshot.appendItems([.multihopSwitch], toSection: .privacyAndSecurity) applySnapshot(snapshot, animated: animated, completion: completion)