diff options
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift | 2 | ||||
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift index cb63867..a73c057 100644 --- a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift +++ b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift @@ -11,6 +11,8 @@ class ErrorPresenter { // TunnelManagementError case TunnelManagementError.tunnelAlreadyExistsWithThatName: return ("Name already exists", "A tunnel with that name already exists") + case TunnelManagementError.tunnelInvalidName: + return ("Name already exists", "The tunnel name is invalid") case TunnelManagementError.vpnSystemErrorOnAddTunnel: return ("Unable to create tunnel", "Internal error") case TunnelManagementError.vpnSystemErrorOnModifyTunnel: diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift index 9515885..1ab7dd7 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift @@ -312,11 +312,11 @@ extension TunnelsListTableViewController: TunnelsManagerDelegate { func tunnelModified(at index: Int) { tableView.reloadRows(at: [IndexPath(row: index, section: 0)], with: .automatic) } - - func tunnelsChanged() { - tableView.reloadData() + + func tunnelMoved(at oldIndex: Int, to newIndex: Int) { + tableView.moveRow(at: IndexPath(row: oldIndex, section: 0), to: IndexPath(row: newIndex, section: 0)) } - + func tunnelRemoved(at index: Int) { tableView.deleteRows(at: [IndexPath(row: index, section: 0)], with: .automatic) } |