Skip to content

Commit

Permalink
Add cell for proxy-settings to Advanced Settings (#2382)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Nov 5, 2024
1 parent 39bcbe5 commit 31f455a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions deltachat-ios/Controller/Settings/AdvancedViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ internal final class AdvancedViewController: UITableViewController {
case videoChat
case viewLog
case accountSettings
case proxySettings
}

private var dcContext: DcContext
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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(
Expand All @@ -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]
}
}()
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 31f455a

Please sign in to comment.