From 69a064d954fe39c8dc7299814fda47470b488b62 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 21 Feb 2019 17:56:52 +0530 Subject: iOS: On changing DNS, update AllowedIPs with the current DNS servers Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'WireGuard/WireGuard/UI/iOS/View/KeyValueCell.swift') 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 { -- cgit v1.2.3-59-g8ed1b