Skip to content

Commit

Permalink
Merge branch 'do-not-show-the-network-issues-banner-when-in-a-blocked…
Browse files Browse the repository at this point in the history
…-ios-379'
  • Loading branch information
buggmagnet committed Nov 15, 2023
2 parents 2a785f3 + 205f65d commit f630f1a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions ios/MullvadVPN/TunnelManager/MapConnectionStatusOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@ class MapConnectionStatusOperation: AsyncOperation {
break
default:
interactor.updateTunnelStatus { tunnelStatus in
let isNetworkReachable = tunnelStatus.observedState.connectionState?.isNetworkReachable ?? false

tunnelStatus = TunnelStatus()
tunnelStatus.state = isNetworkReachable
? .disconnecting(.nothing)
: .waitingForConnectivity(.noNetwork)
// Avoid displaying waiting for connectivity banners if the tunnel in a blocked state when disconnecting
if tunnelStatus.observedState.blockedState != nil {
tunnelStatus.state = .disconnecting(.nothing)
} else {
let isNetworkReachable = tunnelStatus.observedState.connectionState?.isNetworkReachable ?? false
tunnelStatus.state = isNetworkReachable
? .disconnecting(.nothing)
: .waitingForConnectivity(.noNetwork)
}
}
}
}
Expand Down

0 comments on commit f630f1a

Please sign in to comment.