diff options
author | 2019-02-21 17:56:52 +0530 | |
---|---|---|
committer | 2019-02-21 17:57:13 +0530 | |
commit | 69a064d954fe39c8dc7299814fda47470b488b62 (patch) | |
tree | f71ff838b5ed3a1887033d01ba7c483f3adf3964 /WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift | |
parent | macOS: On saving, update AllowedIPs with the current DNS servers (diff) | |
download | wireguard-apple-69a064d954fe39c8dc7299814fda47470b488b62.tar.xz wireguard-apple-69a064d954fe39c8dc7299814fda47470b488b62.zip |
iOS: On changing DNS, update AllowedIPs with the current DNS servers
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift b/WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift index 61b2f2d..df86752 100644 --- a/WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift +++ b/WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift @@ -68,7 +68,7 @@ class KeyValueCell: UITableViewCell { var isStackedVertically = false var contentSizeBasedConstraints = [NSLayoutConstraint]() - var onValueChanged: ((String) -> Void)? + var onValueChanged: ((String, String) -> Void)? var onValueBeingEdited: ((String) -> Void)? var observationToken: AnyObject? @@ -206,7 +206,7 @@ extension KeyValueCell: UITextFieldDelegate { func textFieldDidEndEditing(_ textField: UITextField) { let isModified = textField.text ?? "" != textFieldValueOnBeginEditing guard isModified else { return } - onValueChanged?(textField.text ?? "") + onValueChanged?(textFieldValueOnBeginEditing, textField.text ?? "") } func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { |