From 6c5b309f0f205d5e221858e5c671c5444f7007d6 Mon Sep 17 00:00:00 2001 From: Jon Petersson Date: Wed, 27 Nov 2024 13:36:08 +0100 Subject: [PATCH] Fix custom Wireguard port not being persisted --- .../View controllers/VPNSettings/VPNSettingsViewModel.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift index 90e31ede7347..c2d8788ce355 100644 --- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift +++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewModel.swift @@ -254,10 +254,12 @@ struct VPNSettingsViewModel: Equatable { multihopState = tunnelSettings.tunnelMultihopState } - /// Produce merged view model keeping entry `identifier` for matching DNS entries. + /// Produce merged view model, keeping entry `identifier` for matching DNS entries and + /// retaining available Wireguard port ranges. func merged(_ other: VPNSettingsViewModel) -> VPNSettingsViewModel { var mergedViewModel = other mergedViewModel.customDNSDomains = merge(customDNSDomains, with: other.customDNSDomains) + mergedViewModel.availableWireGuardPortRanges = availableWireGuardPortRanges return mergedViewModel }