handle addition filed is empty
This commit is contained in:
parent
1b5e98e987
commit
4f82de061d
1 changed files with 7 additions and 1 deletions
|
|
@ -48,7 +48,13 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
|
||||||
let cellTitle = tableData[indexPath.section][indexPath.row][.title] as! String
|
let cellTitle = tableData[indexPath.section][indexPath.row][.title] as! String
|
||||||
cellContents[cellTitle] = contentCell.getContent()!
|
cellContents[cellTitle] = contentCell.getContent()!
|
||||||
}
|
}
|
||||||
password!.updatePassword(name: cellContents["name"]!, plainText: "\(cellContents["password"]!)\n\(cellContents["additions"]!)\n")
|
var plainText = ""
|
||||||
|
if cellContents["additions"]! != "" {
|
||||||
|
plainText = "\(cellContents["password"]!)\n\(cellContents["additions"]!)\n"
|
||||||
|
} else {
|
||||||
|
plainText = "\(cellContents["password"]!)\n"
|
||||||
|
}
|
||||||
|
password!.updatePassword(name: cellContents["name"]!, plainText: plainText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue