Skip to content

Commit

Permalink
Merge branch 'fix-location-selection-bug-on-ipad-ios-588'
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Apr 8, 2024
2 parents 42183bb + 312672b commit d7bd774
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
12 changes: 6 additions & 6 deletions ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit d7bd774

Please sign in to comment.