Эх сурвалжийг харах

integrated smptPort settings in PortSettingsController - updates will be shown in AccountSettings

Bastian van de Wetering 6 жил өмнө
parent
commit
e3d85fa202

+ 13 - 4
deltachat-ios/Controller/AccountSetupController.swift

@@ -91,10 +91,12 @@ class AccountSetupController: UITableViewController {
     return cell
   }()
 
-  lazy var smtpPortCell: TextFieldCell = {
-    let cell = TextFieldCell(description: "SMTP Port", placeholder: MRConfig.sendPort ?? MRConfig.configuredSendPort, delegate: self)
-    cell.accessibilityIdentifier = "SMTPPortCell"
-    cell.textField.tag = 8
+  lazy var smtpPortCell: UITableViewCell = {
+		let cell = UITableViewCell(style: .value1, reuseIdentifier: nil)
+		cell.textLabel?.text = "IMAP Port"
+		cell.accessoryType = .disclosureIndicator
+		cell.detailTextLabel?.text = MRConfig.sendPort ?? MRConfig.configuredSendPort
+		cell.accessibilityIdentifier = "SMTPPortCell"
     return cell
   }()
 
@@ -149,6 +151,13 @@ class AccountSetupController: UITableViewController {
     navigationItem.rightBarButtonItem = loginButton
   }
 
+	override func viewWillAppear(_ animated: Bool) {
+		super.viewWillAppear(animated)
+		// needs to be changed if returning from portSettingsController
+		smtpPortCell.detailTextLabel?.text = MRConfig.sendPort ?? MRConfig.configuredSendPort
+		imapPortCell.detailTextLabel?.text = MRConfig.mailPort ?? MRConfig.configuredMailPort
+	}
+
   override func viewDidAppear(_ animated: Bool) {
     super.viewDidAppear(animated)
     addProgressHudEventListener()