summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift12
-rw-r--r--ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift7
2 files changed, 8 insertions, 11 deletions
diff --git a/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift b/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift
index 9c13398422..e2a87e882a 100644
--- a/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift
+++ b/ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift
@@ -50,27 +50,27 @@ class MapConnectionStatusOperation: AsyncOperation {
fetchTunnelStatus(tunnel: tunnel) { observedState in
switch observedState {
case let .connected(connectionState):
- connectionState.isNetworkReachable
+ return connectionState.isNetworkReachable
? .connected(connectionState.selectedRelay)
: .waitingForConnectivity(.noConnection)
case let .connecting(connectionState):
- connectionState.isNetworkReachable
+ return connectionState.isNetworkReachable
? .connecting(connectionState.selectedRelay)
: .waitingForConnectivity(.noConnection)
#if DEBUG
case let .negotiatingKey(connectionState):
- connectionState.isNetworkReachable
+ return connectionState.isNetworkReachable
? .negotiatingKey(connectionState.selectedRelay)
: .waitingForConnectivity(.noConnection)
#endif
case let .reconnecting(connectionState):
- connectionState.isNetworkReachable
+ return connectionState.isNetworkReachable
? .reconnecting(connectionState.selectedRelay)
: .waitingForConnectivity(.noConnection)
case let .error(blockedState):
- .error(blockedState.reason)
+ return .error(blockedState.reason)
case .initial, .disconnecting, .disconnected:
- .none
+ return .none
}
}
return
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift b/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift
index 8340dbf40e..befcaacaf2 100644
--- a/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift
+++ b/ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift
@@ -241,15 +241,12 @@ extension LocationDataSource: UITableViewDelegate {
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
- if let item = itemIdentifier(for: indexPath),
- item == selectedItem {
- cell.setSelected(true, animated: false)
+ if let item = itemIdentifier(for: indexPath), item == selectedItem {
+ tableView.selectRow(at: indexPath, animated: false, scrollPosition: .none)
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
- tableView.deselectRow(at: indexPath, animated: false)
-
guard let item = itemIdentifier(for: indexPath) else { return }
var customListSelection: UserSelectedRelays.CustomListSelection?