summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-12-20 10:53:45 +0100
committerAndrej Mihajlov <and@mullvad.net>2022-12-20 11:12:27 +0100
commit05040c6f2bfdf7b8cec7877859c04d77f1514ef8 (patch)
tree8c4c29310bf636f3a53c1e601084b3878dcbfa00 /ios
parent72fbfa073cfcc5e06e5793c4a69397533729ef87 (diff)
downloadmullvadvpn-05040c6f2bfdf7b8cec7877859c04d77f1514ef8.tar.xz
mullvadvpn-05040c6f2bfdf7b8cec7877859c04d77f1514ef8.zip
Remove logout confirmation
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/AccountViewController.swift62
1 files changed, 2 insertions, 60 deletions
diff --git a/ios/MullvadVPN/AccountViewController.swift b/ios/MullvadVPN/AccountViewController.swift
index 9aa1abd460..9a583fee16 100644
--- a/ios/MullvadVPN/AccountViewController.swift
+++ b/ios/MullvadVPN/AccountViewController.swift
@@ -267,57 +267,9 @@ class AccountViewController: UIViewController {
alertPresenter.enqueue(alertController, presentingController: self)
}
- private func showLogoutConfirmation(animated: Bool, completion: @escaping (Bool) -> Void) {
- let alertController = UIAlertController(
- title: NSLocalizedString(
- "LOGOUT_CONFIRMATION_ALERT_TITLE",
- tableName: "Account",
- value: "Log out",
- comment: ""
- ),
- message: NSLocalizedString(
- "LOGOUT_CONFIRMATION_ALERT_MESSAGE",
- tableName: "Account",
- value: "Are you sure you want to log out?\n\nThis will erase the account number from this device. It is not possible for us to recover it for you. Make sure you have your account number saved somewhere, to be able to log back in.",
- comment: ""
- ),
- preferredStyle: .alert
- )
-
- alertController.addAction(
- UIAlertAction(
- title: NSLocalizedString(
- "LOGOUT_CONFIRMATION_ALERT_CANCEL_ACTION",
- tableName: "Account",
- value: "Cancel",
- comment: ""
- ),
- style: .cancel,
- handler: { alertAction in
- completion(false)
- }
- )
- )
-
- alertController.addAction(
- UIAlertAction(
- title: NSLocalizedString(
- "LOGOUT_CONFIRMATION_ALERT_YES_ACTION",
- tableName: "Account",
- value: "Log out",
- comment: ""
- ),
- style: .destructive,
- handler: { alertAction in
- completion(true)
- }
- )
- )
-
- alertPresenter.enqueue(alertController, presentingController: self)
- }
+ // MARK: - Actions
- private func confirmLogout() {
+ @objc private func doLogout() {
let message = NSLocalizedString(
"LOGGING_OUT_ALERT_TITLE",
tableName: "Account",
@@ -342,16 +294,6 @@ class AccountViewController: UIViewController {
}
}
- // MARK: - Actions
-
- @objc private func doLogout() {
- showLogoutConfirmation(animated: true) { confirmed in
- if confirmed {
- self.confirmLogout()
- }
- }
- }
-
private func copyAccountToken() {
guard let accountData = interactor.deviceState.accountData else {
return