Skip to content

Commit ba779e9

Browse files
committed
Merge branch 'remove-settings-only-on-app-uninstall-ios-577'
2 parents afae8de + 11a2609 commit ba779e9

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

ios/MullvadVPN/AppDelegate.swift

+4
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
502502
}
503503

504504
SettingsManager.resetStore(completely: true)
505+
505506
self.accessMethodRepository.reloadWithDefaultsAfterDataRemoval()
507+
// At app startup, the relay cache tracker will get populated with a list of overriden IPs.
508+
// The overriden IPs will get wiped, therefore, the cache needs to be pruned as well.
509+
try? self.relayCacheTracker.refreshCachedRelays()
506510
}
507511

508512
FirstTimeLaunch.setHasFinished()

ios/MullvadVPN/TunnelManager/SetAccountOperation.swift

-5
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ class SetAccountOperation: ResultOperation<StoredAccountData?> {
161161
completion: @escaping (Result<Void, Error>) -> Void
162162
) {
163163
deleteAccount(accountNumber: accountNumber) { [self] result in
164-
interactor.setSettings(LatestTunnelSettings(), persist: true)
165-
166164
if result.isSuccess {
167165
interactor.removeLastUsedAccount()
168166
}
@@ -231,9 +229,6 @@ class SetAccountOperation: ResultOperation<StoredAccountData?> {
231229
)
232230
)
233231

234-
// Reset tunnel settings.
235-
interactor.setSettings(LatestTunnelSettings(), persist: true)
236-
237232
// Transition device state to logged in.
238233
interactor.setDeviceState(.loggedIn(accountData, storedDeviceData), persist: true)
239234
}

ios/MullvadVPN/TunnelManager/TunnelManager.swift

-2
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,6 @@ final class TunnelManager: StorePaymentObserver {
10921092
}
10931093

10941094
private func unsetTunnelConfiguration(completion: @escaping () -> Void) {
1095-
setSettings(LatestTunnelSettings(), persist: true)
1096-
10971095
// Tell the caller to unsubscribe from VPN status notifications.
10981096
prepareForVPNConfigurationDeletion()
10991097

0 commit comments

Comments
 (0)