Fix #340: Always end password entries with a newline
This commit is contained in:
parent
283a32f6cd
commit
b60ce3b003
4 changed files with 15 additions and 13 deletions
|
|
@ -38,14 +38,10 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
|
|||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
||||
super.prepare(for: segue, sender: sender)
|
||||
if segue.identifier == "saveEditPasswordSegue" {
|
||||
var plainText = (fillPasswordCell?.getContent())!
|
||||
if let additionsString = additionsCell?.getContent(), additionsString.isEmpty == false {
|
||||
plainText.append("\n")
|
||||
plainText.append(additionsString)
|
||||
}
|
||||
let editedPlainText = plainText
|
||||
let (name, url) = getNameURL()
|
||||
if password!.plainText != plainText || password!.url.path != url.path {
|
||||
password!.updatePassword(name: name, url: url, plainText: plainText)
|
||||
if password!.plainText != editedPlainText || password!.url.path != url.path {
|
||||
password!.updatePassword(name: name, url: url, plainText: editedPlainText)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue