diff options
| author | Andrew Bulhak <andrew.bulhak@mullvad.net> | 2025-04-09 15:07:42 +0200 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2025-04-09 16:22:50 +0200 |
| commit | 08841ec61d12869e40ebc1869f3b93936d1e31ba (patch) | |
| tree | 220454b0163ac8a74af4d65d7f9bcf2ecf34045b | |
| parent | 3b2a4af2257155d0af3d33fdaef99c59a98b93f1 (diff) | |
| download | mullvadvpn-08841ec61d12869e40ebc1869f3b93936d1e31ba.tar.xz mullvadvpn-08841ec61d12869e40ebc1869f3b93936d1e31ba.zip | |
Deduplicate arguments to FeatureIndicatorViewModel
3 files changed, 5 insertions, 8 deletions
diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewComponentPreview.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewComponentPreview.swift index c773902f16..1d80901337 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewComponentPreview.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewComponentPreview.swift @@ -70,8 +70,7 @@ struct ConnectionViewComponentPreview<Content: View>: View { FeatureIndicatorsViewModel( tunnelSettings: tunnelSettings, ipOverrides: [], - tunnelState: connectedTunnelStatus.state, - observedState: connectedTunnelStatus.observedState + tunnelStatus: connectedTunnelStatus ), viewModel, $isExpanded diff --git a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift index 76f6d04423..de1a9edab7 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/ConnectionView/FeatureIndicatorsViewModel.swift @@ -19,13 +19,12 @@ class FeatureIndicatorsViewModel: ChipViewModelProtocol { init( tunnelSettings: LatestTunnelSettings, ipOverrides: [IPOverride], - tunnelState: TunnelState, - observedState: ObservedState + tunnelStatus: TunnelStatus ) { self.tunnelSettings = tunnelSettings self.ipOverrides = ipOverrides - self.tunnelState = tunnelState - self.observedState = observedState + self.tunnelState = tunnelStatus.state + self.observedState = tunnelStatus.observedState } var chips: [ChipModel] { diff --git a/ios/MullvadVPN/View controllers/Tunnel/TunnelViewController.swift b/ios/MullvadVPN/View controllers/Tunnel/TunnelViewController.swift index 5524ff5865..fa81a6cbbd 100644 --- a/ios/MullvadVPN/View controllers/Tunnel/TunnelViewController.swift +++ b/ios/MullvadVPN/View controllers/Tunnel/TunnelViewController.swift @@ -74,8 +74,7 @@ class TunnelViewController: UIViewController, RootContainment { indicatorsViewViewModel = FeatureIndicatorsViewModel( tunnelSettings: interactor.tunnelSettings, ipOverrides: interactor.ipOverrides, - tunnelState: tunnelState, - observedState: interactor.tunnelStatus.observedState + tunnelStatus: interactor.tunnelStatus ) connectionView = ConnectionView( |
