summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
authorSteffen Ernst <steffen.ernst@mullvad.net>2025-02-03 09:15:58 +0100
committerSteffen Ernst <steffen.ernst@mullvad.net>2025-02-17 09:40:33 +0100
commit0db06acd7ddaab0faede6c8063a31b154d119daf (patch)
tree1a0e87cff2d13c009cabd969d9db08ef9193d6a5 /ios
parentaec878740e70fc1d0184a84ef2a7e80a84f2152c (diff)
downloadmullvadvpn-0db06acd7ddaab0faede6c8063a31b154d119daf.tar.xz
mullvadvpn-0db06acd7ddaab0faede6c8063a31b154d119daf.zip
Fix execution order of alert dismissal
Needs to dismiss before calling function that might dismiss another vc
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/View controllers/Alert/AlertViewController.swift3
1 files changed, 1 insertions, 2 deletions
diff --git a/ios/MullvadVPN/View controllers/Alert/AlertViewController.swift b/ios/MullvadVPN/View controllers/Alert/AlertViewController.swift
index a4d35237c9..b83286e1ee 100644
--- a/ios/MullvadVPN/View controllers/Alert/AlertViewController.swift
+++ b/ios/MullvadVPN/View controllers/Alert/AlertViewController.swift
@@ -309,11 +309,10 @@ class AlertViewController: UIViewController {
}
@objc private func didTapButton(_ button: AppButton) {
+ onDismiss?()
if let handler = handlers.removeValue(forKey: button) {
handler()
}
-
handlers.removeAll()
- onDismiss?()
}
}