diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2022-02-01 12:17:09 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2022-02-02 17:37:00 +0100 |
| commit | 6e6854fdc78b47ea78cdc5933093442358eecfdc (patch) | |
| tree | d990cab94c1f21920a447e84d526628c1186bb20 | |
| parent | 83a91bda99f65fc6d571ce06ee8c0cd6b383403c (diff) | |
| download | mullvadvpn-6e6854fdc78b47ea78cdc5933093442358eecfdc.tar.xz mullvadvpn-6e6854fdc78b47ea78cdc5933093442358eecfdc.zip | |
Rename missingAccount to unsetAccount
8 files changed, 10 insertions, 10 deletions
diff --git a/ios/MullvadVPN/DisplayChainedError.swift b/ios/MullvadVPN/DisplayChainedError.swift index ce03bf5348..8baef34ece 100644 --- a/ios/MullvadVPN/DisplayChainedError.swift +++ b/ios/MullvadVPN/DisplayChainedError.swift @@ -236,7 +236,7 @@ extension TunnelManager.Error: DisplayChainedError { // This error is never displayed anywhere return nil - case .missingAccount: + case .unsetAccount: return NSLocalizedString( "MISSING_ACCOUNT_INTERNAL_ERROR", tableName: "TunnelManager", diff --git a/ios/MullvadVPN/TunnelManager/ReloadTunnelOperation.swift b/ios/MullvadVPN/TunnelManager/ReloadTunnelOperation.swift index a520244e0f..3758c9e4e9 100644 --- a/ios/MullvadVPN/TunnelManager/ReloadTunnelOperation.swift +++ b/ios/MullvadVPN/TunnelManager/ReloadTunnelOperation.swift @@ -30,7 +30,7 @@ class ReloadTunnelOperation: AsyncOperation { } guard let tunnelProvider = self.state.tunnelProvider else { - self.completeOperation(completion: .failure(.missingAccount)) + self.completeOperation(completion: .failure(.unsetAccount)) return } diff --git a/ios/MullvadVPN/TunnelManager/ReplaceKeyOperation.swift b/ios/MullvadVPN/TunnelManager/ReplaceKeyOperation.swift index a3569a400e..6cc9828c57 100644 --- a/ios/MullvadVPN/TunnelManager/ReplaceKeyOperation.swift +++ b/ios/MullvadVPN/TunnelManager/ReplaceKeyOperation.swift @@ -106,7 +106,7 @@ class ReplaceKeyOperation: AsyncOperation { } guard let tunnelInfo = state.tunnelInfo else { - completionHandler(.failure(.missingAccount)) + completionHandler(.failure(.unsetAccount)) return } diff --git a/ios/MullvadVPN/TunnelManager/SetTunnelSettingsOperation.swift b/ios/MullvadVPN/TunnelManager/SetTunnelSettingsOperation.swift index 52b71538c8..86e6c1a4ff 100644 --- a/ios/MullvadVPN/TunnelManager/SetTunnelSettingsOperation.swift +++ b/ios/MullvadVPN/TunnelManager/SetTunnelSettingsOperation.swift @@ -42,7 +42,7 @@ class SetTunnelSettingsOperation: AsyncOperation { } guard let accountToken = state.tunnelInfo?.token else { - completionHandler(.failure(.missingAccount)) + completionHandler(.failure(.unsetAccount)) return } diff --git a/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift b/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift index 21b59bea5f..1037253da5 100644 --- a/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift +++ b/ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift @@ -44,7 +44,7 @@ class StartTunnelOperation: AsyncOperation { } guard let tunnelInfo = self.state.tunnelInfo else { - completionHandler(.failure(.missingAccount)) + completionHandler(.failure(.unsetAccount)) return } diff --git a/ios/MullvadVPN/TunnelManager/StopTunnelOperation.swift b/ios/MullvadVPN/TunnelManager/StopTunnelOperation.swift index 1b06a6f68b..297805eb8e 100644 --- a/ios/MullvadVPN/TunnelManager/StopTunnelOperation.swift +++ b/ios/MullvadVPN/TunnelManager/StopTunnelOperation.swift @@ -39,7 +39,7 @@ class StopTunnelOperation: AsyncOperation { } guard let tunnelProvider = state.tunnelProvider else { - completionHandler(.failure(.missingAccount)) + completionHandler(.failure(.unsetAccount)) return } diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift index 6b62d9d39b..44e02c5524 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift @@ -644,7 +644,7 @@ extension TunnelManager { return submitBackgroundTask(at: beginDate) } else { - return .failure(.missingAccount) + return .failure(.unsetAccount) } } @@ -722,7 +722,7 @@ extension TunnelManager { fileprivate func nextRetryScheduleDate(_ error: TunnelManager.Error) -> Date? { switch error { - case .missingAccount: + case .unsetAccount: // Do not retry if logged out. return nil diff --git a/ios/MullvadVPN/TunnelManager/TunnelManagerError.swift b/ios/MullvadVPN/TunnelManager/TunnelManagerError.swift index 01fcbb136d..96591f9314 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManagerError.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManagerError.swift @@ -11,8 +11,8 @@ import Foundation extension TunnelManager { /// An error emitted by all public methods of TunnelManager enum Error: ChainedError { - /// Account token is not set - case missingAccount + /// Account is unset. + case unsetAccount /// A failure to start the VPN tunnel via system call case startVPNTunnel(Swift.Error) |
