only prepare saveEditPasswordSegue
This commit is contained in:
parent
286f90b92e
commit
ae93727c6b
1 changed files with 10 additions and 8 deletions
|
|
@ -39,15 +39,17 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
|
|||
}
|
||||
|
||||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
||||
let cells = tableView.visibleCells
|
||||
var cellContents = [String: String]()
|
||||
for cell in cells {
|
||||
let indexPath = tableView.indexPath(for: cell)!
|
||||
let contentCell = cell as! ContentTableViewCell
|
||||
let cellTitle = tableData[indexPath.section][indexPath.row][.title] as! String
|
||||
cellContents[cellTitle] = contentCell.getContent()!
|
||||
if segue.identifier == "saveEditPasswordSegue" {
|
||||
let cells = tableView.visibleCells
|
||||
var cellContents = [String: String]()
|
||||
for cell in cells {
|
||||
let indexPath = tableView.indexPath(for: cell)!
|
||||
let contentCell = cell as! ContentTableViewCell
|
||||
let cellTitle = tableData[indexPath.section][indexPath.row][.title] as! String
|
||||
cellContents[cellTitle] = contentCell.getContent()!
|
||||
}
|
||||
password!.updatePassword(name: cellContents["name"]!, plainText: "\(cellContents["password"]!)\n\(cellContents["additions"]!)")
|
||||
}
|
||||
password!.updatePassword(name: cellContents["name"]!, plainText: "\(cellContents["password"]!)\n\(cellContents["additions"]!)")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue