diff --git a/ios/MullvadVPN/TunnelManager/TunnelState.swift b/ios/MullvadVPN/TunnelManager/TunnelState.swift index 87f05e9f7c60..41702065a1cd 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelState.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelState.swift @@ -145,6 +145,10 @@ enum TunnelState: Equatable, CustomStringConvertible, Sendable { nil } } + + var isMultihop: Bool { + relays?.entry != nil + } } /// A enum that describes the action to perform after disconnect. diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift index 73bc01f8abec..71b864bc85b9 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift @@ -52,8 +52,9 @@ struct QuantumResistanceFeature: ChipFeature { struct MultihopFeature: ChipFeature { let settings: LatestTunnelSettings + let state: TunnelState var isEnabled: Bool { - settings.tunnelMultihopState.isEnabled + settings.tunnelMultihopState.isEnabled || state.isMultihop } var name: String { diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift index d07ee2c69e35..39a18c987a1c 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift @@ -29,7 +29,7 @@ class FeatureIndicatorsViewModel: ChipViewModelProtocol { let features: [ChipFeature] = [ DaitaFeature(settings: tunnelSettings), QuantumResistanceFeature(settings: tunnelSettings), - MultihopFeature(settings: tunnelSettings), + MultihopFeature(settings: tunnelSettings, state: tunnelState), ObfuscationFeature(settings: tunnelSettings), DNSFeature(settings: tunnelSettings), IPOverrideFeature(overrides: ipOverrides),