Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix location selection bug on iPad #6069

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading