summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/TunnelManager/TunnelState.swift4
-rw-r--r--ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ChipView/ChipFeature.swift3
-rw-r--r--ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift2
3 files changed, 7 insertions, 2 deletions
diff --git a/ios/MullvadVPN/TunnelManager/TunnelState.swift b/ios/MullvadVPN/TunnelManager/TunnelState.swift
index 87f05e9f7c..41702065a1 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 73bc01f8ab..71b864bc85 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 d07ee2c69e..39a18c987a 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),