Browse Source

open account setup from profile

B. Petersen 5 years ago
parent
commit
a9c127829e

+ 6 - 0
deltachat-ios/Controller/EditSettingsController.swift

@@ -101,6 +101,12 @@ class EditSettingsController: UITableViewController {
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         guard let cell = tableView.cellForRow(at: indexPath) else { return }
         guard let cell = tableView.cellForRow(at: indexPath) else { return }
         if cell.accessibilityIdentifier == "accountSettingsCell" {
         if cell.accessibilityIdentifier == "accountSettingsCell" {
+            tableView.deselectRow(at: indexPath, animated: true)
+            guard let nc = navigationController else { return }
+            let accountSetupVC = AccountSetupController(dcContext: dcContext, editView: true)
+            let coordinator = AccountSetupCoordinator(dcContext: dcContext, navigationController: nc)
+            accountSetupVC.coordinator = coordinator
+            nc.pushViewController(accountSetupVC, animated: true)
         }
         }
     }
     }
 }
 }

+ 0 - 5
deltachat-ios/Controller/SettingsController.swift

@@ -104,11 +104,6 @@ internal final class SettingsViewController: QuickTableViewController {
                         action: { _ in
                         action: { _ in
                             self.coordinator?.showEditSettingsController()
                             self.coordinator?.showEditSettingsController()
                     }),
                     }),
-                    NavigationRow(text: String.localized("pref_password_and_account_settings"),
-                        detailText: .none,
-                        action: { _ in
-                            self.coordinator?.showAccountSetupController()
-                    }),
                 ]
                 ]
             ),
             ),
 
 

+ 0 - 8
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -173,14 +173,6 @@ class SettingsCoordinator: Coordinator {
         self.navigationController = navigationController
         self.navigationController = navigationController
     }
     }
 
 
-    func showAccountSetupController() {
-        let accountSetupVC = AccountSetupController(dcContext: dcContext, editView: true)
-        let coordinator = AccountSetupCoordinator(dcContext: dcContext, navigationController: navigationController)
-        childCoordinators.append(coordinator)
-        accountSetupVC.coordinator = coordinator
-        navigationController.pushViewController(accountSetupVC, animated: true)
-    }
-
     func showEditSettingsController() {
     func showEditSettingsController() {
         let editController = EditSettingsController(dcContext: dcContext)
         let editController = EditSettingsController(dcContext: dcContext)
         navigationController.pushViewController(editController, animated: true)
         navigationController.pushViewController(editController, animated: true)