Fix #340: Always end password entries with a newline

This commit is contained in:
Danny Moesch 2019-12-10 23:20:59 +01:00 committed by Mingshen Sun
parent 283a32f6cd
commit b60ce3b003
4 changed files with 15 additions and 13 deletions

View file

@ -49,11 +49,6 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
super.prepare(for: segue, sender: sender)
if segue.identifier == "saveAddPasswordSegue" {
var plainText = (fillPasswordCell?.getContent())!
if let additionsString = additionsCell?.getContent(), additionsString.isEmpty == false {
plainText.append("\n")
plainText.append(additionsString)
}
let (name, url) = getNameURL()
password = Password(name: name, url: url, plainText: plainText)
}