|
@@ -10,7 +10,12 @@ class EditSettingsController: UITableViewController {
|
|
|
private let section1Name = 0
|
|
|
private let section1Status = 1
|
|
|
private let section1RowCount = 2
|
|
|
- private let sectionCount = 1
|
|
|
+
|
|
|
+ private let section2 = 1
|
|
|
+ private let section2AccountSettings = 0
|
|
|
+ private let section2RowCount = 1
|
|
|
+
|
|
|
+ private let sectionCount = 2
|
|
|
|
|
|
private lazy var displayNameCell: TextFieldCell = {
|
|
|
let cell = TextFieldCell(description: String.localized("pref_your_name"), placeholder: String.localized("pref_your_name"))
|
|
@@ -24,6 +29,14 @@ class EditSettingsController: UITableViewController {
|
|
|
return cell
|
|
|
}()
|
|
|
|
|
|
+ lazy var accountSettingsCell: UITableViewCell = {
|
|
|
+ let cell = UITableViewCell(style: .value1, reuseIdentifier: nil)
|
|
|
+ cell.textLabel?.text = String.localized("pref_password_and_account_settings")
|
|
|
+ cell.accessoryType = .disclosureIndicator
|
|
|
+ cell.accessibilityIdentifier = "accountSettingsCell"
|
|
|
+ return cell
|
|
|
+ }()
|
|
|
+
|
|
|
init(dcContext: DcContext) {
|
|
|
self.dcContext = dcContext
|
|
|
super.init(style: .grouped)
|
|
@@ -58,14 +71,23 @@ class EditSettingsController: UITableViewController {
|
|
|
}
|
|
|
|
|
|
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
|
|
- return section1RowCount
|
|
|
+ if section == section1 {
|
|
|
+ return section1RowCount
|
|
|
+ } else {
|
|
|
+ return section2RowCount
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
|
|
- if indexPath.section == section1 && indexPath.row == section1Name {
|
|
|
- return displayNameCell
|
|
|
+ if indexPath.section == section1 {
|
|
|
+ if indexPath.row == section1Name {
|
|
|
+ return displayNameCell
|
|
|
+ } else {
|
|
|
+ return statusCell
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return accountSettingsCell
|
|
|
}
|
|
|
- return statusCell
|
|
|
}
|
|
|
|
|
|
override func tableView(_: UITableView, titleForFooterInSection section: Int) -> String? {
|
|
@@ -75,4 +97,10 @@ class EditSettingsController: UITableViewController {
|
|
|
return nil
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
|
|
+ guard let cell = tableView.cellForRow(at: indexPath) else { return }
|
|
|
+ if cell.accessibilityIdentifier == "accountSettingsCell" {
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|