diff options
| author | Bug Magnet <marco.nikic@mullvad.net> | 2024-03-28 14:08:55 +0100 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2024-03-28 14:08:55 +0100 |
| commit | ba779e988e7d48c5d7051e1eb59b77da195da1a6 (patch) | |
| tree | 5696cefaecc1734c4e61476c8b203faadb6f8f11 | |
| parent | afae8decc4a6dbb58b732af8271e8dacf5199acb (diff) | |
| parent | 11a2609e527830ec72b05275475b878c73288463 (diff) | |
| download | mullvadvpn-ba779e988e7d48c5d7051e1eb59b77da195da1a6.tar.xz mullvadvpn-ba779e988e7d48c5d7051e1eb59b77da195da1a6.zip | |
Merge branch 'remove-settings-only-on-app-uninstall-ios-577'
| -rw-r--r-- | ios/MullvadVPN/AppDelegate.swift | 4 | ||||
| -rw-r--r-- | ios/MullvadVPN/TunnelManager/SetAccountOperation.swift | 5 | ||||
| -rw-r--r-- | ios/MullvadVPN/TunnelManager/TunnelManager.swift | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index eab4b8bf5d..a2239e3e7c 100644 --- a/ios/MullvadVPN/AppDelegate.swift +++ b/ios/MullvadVPN/AppDelegate.swift @@ -502,7 +502,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD } SettingsManager.resetStore(completely: true) + self.accessMethodRepository.reloadWithDefaultsAfterDataRemoval() + // At app startup, the relay cache tracker will get populated with a list of overriden IPs. + // The overriden IPs will get wiped, therefore, the cache needs to be pruned as well. + try? self.relayCacheTracker.refreshCachedRelays() } FirstTimeLaunch.setHasFinished() diff --git a/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift b/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift index da9dab6fef..db6e1cc814 100644 --- a/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift +++ b/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift @@ -161,8 +161,6 @@ class SetAccountOperation: ResultOperation<StoredAccountData?> { completion: @escaping (Result<Void, Error>) -> Void ) { deleteAccount(accountNumber: accountNumber) { [self] result in - interactor.setSettings(LatestTunnelSettings(), persist: true) - if result.isSuccess { interactor.removeLastUsedAccount() } @@ -231,9 +229,6 @@ class SetAccountOperation: ResultOperation<StoredAccountData?> { ) ) - // Reset tunnel settings. - interactor.setSettings(LatestTunnelSettings(), persist: true) - // Transition device state to logged in. interactor.setDeviceState(.loggedIn(accountData, storedDeviceData), persist: true) } diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift index 3f4c4c67d5..cc4ce36da6 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift @@ -1092,8 +1092,6 @@ final class TunnelManager: StorePaymentObserver { } private func unsetTunnelConfiguration(completion: @escaping () -> Void) { - setSettings(LatestTunnelSettings(), persist: true) - // Tell the caller to unsubscribe from VPN status notifications. prepareForVPNConfigurationDeletion() |
