Add account detail so that we can edit account name and account active on iOS.

This commit is contained in:
Maurice Parker
2019-05-17 17:25:47 -05:00
parent 9c159d21f6
commit f36b5a7970
5 changed files with 148 additions and 7 deletions

View File

@@ -48,6 +48,8 @@ class SettingsViewController: UITableViewController {
buildLabel.translatesAutoresizingMaskIntoConstraints = false
tableView.tableFooterView = buildLabel
tableView.reloadData()
}
// MARK: UITableView
@@ -96,10 +98,12 @@ class SettingsViewController: UITableViewController {
case 0:
let sortedAccounts = AccountManager.shared.sortedAccounts
if indexPath.row == sortedAccounts.count {
let timeline = UIStoryboard.settings.instantiateController(ofType: AddAccountViewController.self)
self.navigationController?.pushViewController(timeline, animated: true)
let controller = UIStoryboard.settings.instantiateController(ofType: AddAccountViewController.self)
self.navigationController?.pushViewController(controller, animated: true)
} else {
// TODO
let controller = UIStoryboard.settings.instantiateController(ofType: DetailAccountViewController.self)
controller.account = sortedAccounts[indexPath.row]
self.navigationController?.pushViewController(controller, animated: true)
}
case 1:
switch indexPath.row {