Skip to content

Commit

Permalink
Merge branch 'location-pin-shown-on-map-when-disconnected-ios-477'
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Feb 20, 2024
2 parents 8186d8f + 481f085 commit ab8ab7e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ class TunnelViewController: UIViewController, RootContainment {
let center = tunnelRelay.location.geoCoordinate
mapViewController.setCenter(center, animated: animated) {
self.contentView.setAnimatingActivity(false)
self.mapViewController.addLocationMarker(coordinate: center)

// Connection can change during animation, so make sure we're still connected before adding marker.
if case .connected = self.tunnelState {
self.mapViewController.addLocationMarker(coordinate: center)
}
}

case .pendingReconnect:
Expand Down

0 comments on commit ab8ab7e

Please sign in to comment.