aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/View
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-02-21 17:56:52 +0530
committerRoopesh Chander <roop@roopc.net>2019-02-21 17:57:13 +0530
commit69a064d954fe39c8dc7299814fda47470b488b62 (patch)
treef71ff838b5ed3a1887033d01ba7c483f3adf3964 /WireGuard/WireGuard/UI/iOS/View
parentmacOS: On saving, update AllowedIPs with the current DNS servers (diff)
downloadwireguard-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 'WireGuard/WireGuard/UI/iOS/View')
-rw-r--r--WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift4
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 {