Fix #324: Do not copy password automatically when adding/editing it
This commit is contained in:
parent
e3d9d4c45c
commit
e418d216b9
2 changed files with 1 additions and 5 deletions
|
|
@ -204,7 +204,6 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
|||
|
||||
let length = passwordLengthCell?.roundedValue ?? 0
|
||||
let plainPassword = PasswordGeneratorFlavour.from(SharedDefaults[.passwordGeneratorFlavor]).generatePassword(length: length)
|
||||
SecurePasteboard.shared.copy(textToCopy: plainPassword)
|
||||
|
||||
// update tableData so to make sure reloadData() works correctly
|
||||
tableData[passwordSection][0][PasswordEditorCellKey.content] = plainPassword
|
||||
|
|
@ -274,7 +273,6 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
|||
} else if textField == fillPasswordCell?.contentTextField {
|
||||
if let plainPassword = fillPasswordCell?.getContent() {
|
||||
tableData[passwordSection][0][PasswordEditorCellKey.content] = plainPassword
|
||||
SecurePasteboard.shared.copy(textToCopy: plainPassword)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -347,8 +345,6 @@ class PasswordEditorTableViewController: UITableViewController, FillPasswordTabl
|
|||
self.tableData[self.passwordSection][0][PasswordEditorCellKey.content] = generatedPassword
|
||||
// update cell manually, no need to call reloadData()
|
||||
self.fillPasswordCell?.setContent(content: generatedPassword)
|
||||
// make sure the clipboard gets cleared in 45s
|
||||
SecurePasteboard.shared.copy(textToCopy: generatedPassword)
|
||||
}))
|
||||
alert.addAction(UIAlertAction(title: "Cancel".localize(), style: UIAlertAction.Style.cancel, handler:nil))
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue