diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift index eab4b8bf5d08..a2239e3e7cb8 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 da9dab6fef3d..db6e1cc81436 100644 --- a/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift +++ b/ios/MullvadVPN/TunnelManager/SetAccountOperation.swift @@ -161,8 +161,6 @@ class SetAccountOperation: ResultOperation { completion: @escaping (Result) -> Void ) { deleteAccount(accountNumber: accountNumber) { [self] result in - interactor.setSettings(LatestTunnelSettings(), persist: true) - if result.isSuccess { interactor.removeLastUsedAccount() } @@ -231,9 +229,6 @@ class SetAccountOperation: ResultOperation { ) ) - // 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 3f4c4c67d582..cc4ce36da6c6 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()