Skip to content

Commit d7bd774

Browse files
committed
Merge branch 'fix-location-selection-bug-on-ipad-ios-588'
2 parents 42183bb + 312672b commit d7bd774

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,27 @@ class MapConnectionStatusOperation: AsyncOperation {
5050
fetchTunnelStatus(tunnel: tunnel) { observedState in
5151
switch observedState {
5252
case let .connected(connectionState):
53-
connectionState.isNetworkReachable
53+
return connectionState.isNetworkReachable
5454
? .connected(connectionState.selectedRelay)
5555
: .waitingForConnectivity(.noConnection)
5656
case let .connecting(connectionState):
57-
connectionState.isNetworkReachable
57+
return connectionState.isNetworkReachable
5858
? .connecting(connectionState.selectedRelay)
5959
: .waitingForConnectivity(.noConnection)
6060
#if DEBUG
6161
case let .negotiatingKey(connectionState):
62-
connectionState.isNetworkReachable
62+
return connectionState.isNetworkReachable
6363
? .negotiatingKey(connectionState.selectedRelay)
6464
: .waitingForConnectivity(.noConnection)
6565
#endif
6666
case let .reconnecting(connectionState):
67-
connectionState.isNetworkReachable
67+
return connectionState.isNetworkReachable
6868
? .reconnecting(connectionState.selectedRelay)
6969
: .waitingForConnectivity(.noConnection)
7070
case let .error(blockedState):
71-
.error(blockedState.reason)
71+
return .error(blockedState.reason)
7272
case .initial, .disconnecting, .disconnected:
73-
.none
73+
return .none
7474
}
7575
}
7676
return

ios/MullvadVPN/View controllers/SelectLocation/LocationDataSource.swift

+2-5
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,12 @@ extension LocationDataSource: UITableViewDelegate {
241241
}
242242

243243
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
244-
if let item = itemIdentifier(for: indexPath),
245-
item == selectedItem {
246-
cell.setSelected(true, animated: false)
244+
if let item = itemIdentifier(for: indexPath), item == selectedItem {
245+
tableView.selectRow(at: indexPath, animated: false, scrollPosition: .none)
247246
}
248247
}
249248

250249
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
251-
tableView.deselectRow(at: indexPath, animated: false)
252-
253250
guard let item = itemIdentifier(for: indexPath) else { return }
254251

255252
var customListSelection: UserSelectedRelays.CustomListSelection?

0 commit comments

Comments
 (0)