|
@@ -82,7 +82,6 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
|
|
cell.tag = tagEmailCell
|
|
cell.tag = tagEmailCell
|
|
cell.textField.addTarget(self, action: #selector(emailCellEdited), for: .editingChanged)
|
|
cell.textField.addTarget(self, action: #selector(emailCellEdited), for: .editingChanged)
|
|
cell.textField.tag = tagTextFieldEmail // will be used to eventually show oAuth-Dialogue when pressing return key
|
|
cell.textField.tag = tagTextFieldEmail // will be used to eventually show oAuth-Dialogue when pressing return key
|
|
- cell.setText(text: dcContext.addr ?? nil)
|
|
|
|
cell.textField.delegate = self
|
|
cell.textField.delegate = self
|
|
cell.textField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
|
|
cell.textField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
|
|
return cell
|
|
return cell
|
|
@@ -93,7 +92,6 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
|
|
cell.tag = tagPasswordCell
|
|
cell.tag = tagPasswordCell
|
|
cell.textField.tag = tagTextFieldPassword // will be used to eventually show oAuth-Dialogue when selecting
|
|
cell.textField.tag = tagTextFieldPassword // will be used to eventually show oAuth-Dialogue when selecting
|
|
cell.textField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
|
|
cell.textField.addTarget(self, action: #selector(textFieldDidChange), for: .editingChanged)
|
|
- cell.setText(text: dcContext.mailPw ?? nil)
|
|
|
|
cell.textField.delegate = self
|
|
cell.textField.delegate = self
|
|
return cell
|
|
return cell
|
|
}()
|
|
}()
|
|
@@ -361,7 +359,9 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
override func viewWillAppear(_ animated: Bool) {
|
|
super.viewWillAppear(animated)
|
|
super.viewWillAppear(animated)
|
|
initSelectionCells()
|
|
initSelectionCells()
|
|
|
|
+ updateCellData()
|
|
handleLoginButton()
|
|
handleLoginButton()
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
override func viewDidAppear(_ animated: Bool) {
|
|
override func viewDidAppear(_ animated: Bool) {
|
|
@@ -494,6 +494,12 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // MARK: - updates
|
|
|
|
+ private func updateCellData() {
|
|
|
|
+ emailCell.setText(text: dcContext.addr ?? nil)
|
|
|
|
+ passwordCell.setText(text: dcContext.mailPw ?? nil)
|
|
|
|
+ }
|
|
|
|
+
|
|
// MARK: - actions
|
|
// MARK: - actions
|
|
private func toggleAdvancedSection() {
|
|
private func toggleAdvancedSection() {
|
|
let willShow = !advancedSectionShowing
|
|
let willShow = !advancedSectionShowing
|
|
@@ -779,7 +785,6 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
|
|
DatabaseHelper().clearAccountData()
|
|
DatabaseHelper().clearAccountData()
|
|
appDelegate.open()
|
|
appDelegate.open()
|
|
appDelegate.start()
|
|
appDelegate.start()
|
|
-
|
|
|
|
appDelegate.appCoordinator.presentWelcomeController()
|
|
appDelegate.appCoordinator.presentWelcomeController()
|
|
}))
|
|
}))
|
|
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel))
|
|
alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel))
|
|
@@ -843,7 +848,7 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-// MARK: -
|
|
|
|
|
|
+// MARK: - UITextFieldDelegate
|
|
extension AccountSetupController: UITextFieldDelegate {
|
|
extension AccountSetupController: UITextFieldDelegate {
|
|
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
|
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
|
let currentTag = textField.tag
|
|
let currentTag = textField.tag
|