From 31f455a894278c9a4dc1d4aeaed8a2452a183606 Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Mon, 4 Nov 2024 16:34:25 +0100 Subject: [PATCH] Add cell for proxy-settings to Advanced Settings (#2382) --- .../Settings/AdvancedViewController.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/deltachat-ios/Controller/Settings/AdvancedViewController.swift b/deltachat-ios/Controller/Settings/AdvancedViewController.swift index 1553f1c74..4d0ac50fa 100644 --- a/deltachat-ios/Controller/Settings/AdvancedViewController.swift +++ b/deltachat-ios/Controller/Settings/AdvancedViewController.swift @@ -19,6 +19,7 @@ internal final class AdvancedViewController: UITableViewController { case videoChat case viewLog case accountSettings + case proxySettings } private var dcContext: DcContext @@ -75,6 +76,14 @@ internal final class AdvancedViewController: UITableViewController { return cell }() + private lazy var proxySettingsCell: UITableViewCell = { + let cell = UITableViewCell(style: .default, reuseIdentifier: nil) + cell.textLabel?.text = String.localized("proxy_settings") + cell.accessoryType = .disclosureIndicator + cell.tag = CellTags.proxySettings.rawValue + return cell + }() + lazy var sentboxWatchCell: SwitchCell = { return SwitchCell( textLabel: String.localized("pref_watch_sent_folder"), @@ -242,7 +251,7 @@ internal final class AdvancedViewController: UITableViewController { let serverSection = SectionConfigs( headerTitle: String.localized("pref_server"), footerTitle: nil, - cells: [accountSettingsCell]) + cells: [accountSettingsCell, proxySettingsCell]) return [viewLogSection, experimentalSection, encryptionSection, serverSection] } else { let appAccessSection = SectionConfigs( @@ -256,7 +265,7 @@ internal final class AdvancedViewController: UITableViewController { let serverSection = SectionConfigs( headerTitle: String.localized("pref_server"), footerTitle: String.localized("pref_only_fetch_mvbox_explain"), - cells: [accountSettingsCell, sentboxWatchCell, sendCopyToSelfCell, mvboxMoveCell, onlyFetchMvboxCell]) + cells: [accountSettingsCell, sentboxWatchCell, sendCopyToSelfCell, mvboxMoveCell, onlyFetchMvboxCell, proxySettingsCell]) return [viewLogSection, experimentalSection, appAccessSection, encryptionSection, serverSection] } }() @@ -320,6 +329,9 @@ internal final class AdvancedViewController: UITableViewController { Utils.authenticateDeviceOwner(reason: String.localized("pref_password_and_account_settings")) { [weak self] in self?.showAccountSettingsController() } + case .proxySettings: + //TODO: Show ProxySettingsViewController + break case .defaultTagValue: break }