Skip to content

Commit dd4dd17

Browse files
authored
Update password in the destination controller when save edit (#688)
1 parent 0f48270 commit dd4dd17

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pass/Controllers/EditPasswordTableViewController.swift

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class EditPasswordTableViewController: PasswordEditorTableViewController {
2828
if password!.plainText != editedPlainText || password!.path != path {
2929
password!.updatePassword(name: name, path: path, plainText: editedPlainText)
3030
}
31+
if let controller = segue.destination as? PasswordDetailTableViewController {
32+
controller.password = password
33+
}
3134
}
3235
}
3336
}

pass/Controllers/PasswordDetailTableViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
2121
}
2222
}
2323

24-
private var password: Password?
24+
var password: Password?
2525
private var passwordImage: UIImage?
2626
private var oneTimePasswordIndexPath: IndexPath?
2727
private var shouldPopCurrentView = false

0 commit comments

Comments
 (0)