Update password in the destination controller when save edit (#688)

This commit is contained in:
Mingshen Sun
2025-03-02 11:43:46 -08:00
committed by GitHub
parent 0f482709ae
commit dd4dd174d4
2 changed files with 4 additions and 1 deletions

View File

@@ -28,6 +28,9 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
if password!.plainText != editedPlainText || password!.path != path {
password!.updatePassword(name: name, path: path, plainText: editedPlainText)
}
if let controller = segue.destination as? PasswordDetailTableViewController {
controller.password = password
}
}
}
}

View File

@@ -21,7 +21,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
}
}
private var password: Password?
var password: Password?
private var passwordImage: UIImage?
private var oneTimePasswordIndexPath: IndexPath?
private var shouldPopCurrentView = false