mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-01-17 22:09:06 +00:00
Fixed editable KeyValueCells being copyable
Fixed DNS servers not saving Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
This commit is contained in:
parent
1e9c806614
commit
5a08c67f33
@ -29,6 +29,7 @@ class TunnelEditEditableKeyValueCell: TunnelEditKeyValueCell {
|
||||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
|
||||
copyableGesture = false
|
||||
valueTextField.textColor = .black
|
||||
valueTextField.isEnabled = true
|
||||
valueLabelScrollView.isScrollEnabled = false
|
||||
|
@ -246,7 +246,6 @@ extension TunnelEditTableViewController {
|
||||
// Bind values to view model
|
||||
cell.value = tunnelViewModel.interfaceData[field]
|
||||
if field == .dns { // While editing DNS, you might directly set exclude private IPs
|
||||
cell.onValueChanged = nil
|
||||
cell.onValueBeingEdited = { [weak self] value in
|
||||
self?.tunnelViewModel.interfaceData[field] = value
|
||||
}
|
||||
@ -254,7 +253,6 @@ extension TunnelEditTableViewController {
|
||||
cell.onValueChanged = { [weak self] value in
|
||||
self?.tunnelViewModel.interfaceData[field] = value
|
||||
}
|
||||
cell.onValueBeingEdited = nil
|
||||
}
|
||||
// Compute public key live
|
||||
if field == .privateKey {
|
||||
@ -266,8 +264,6 @@ extension TunnelEditTableViewController {
|
||||
self.tableView.reloadRows(at: [IndexPath(row: row, section: indexPath.section)], with: .none)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cell.onValueBeingEdited = nil
|
||||
}
|
||||
return cell
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user