diff options
| author | Emīls <emils@mullvad.net> | 2023-06-19 14:33:52 +0200 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2023-06-19 14:33:52 +0200 |
| commit | 49c058091dc63c901ed3f7b558d489e3078a30f0 (patch) | |
| tree | 9ae40fbe58c54acc8d0b8e9e802f5d152ef007be | |
| parent | 1735c77d1e7af0652631a6d04b88edc7d3eb5398 (diff) | |
| parent | 2b3fc7f9b43dc577957ce8ef6f257e7cba266752 (diff) | |
| download | mullvadvpn-49c058091dc63c901ed3f7b558d489e3078a30f0.tar.xz mullvadvpn-49c058091dc63c901ed3f7b558d489e3078a30f0.zip | |
Merge branch 'when-trying-to-revoke-a-device-from-the-_too-many-devices_-ios-200'
| -rw-r--r-- | ios/MullvadVPN/Classes/CustomAlertViewController.swift | 8 | ||||
| -rw-r--r-- | ios/MullvadVPN/Operations/PresentAlertOperation.swift | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/ios/MullvadVPN/Classes/CustomAlertViewController.swift b/ios/MullvadVPN/Classes/CustomAlertViewController.swift index 42ceaf3c4b..5a99673a0d 100644 --- a/ios/MullvadVPN/Classes/CustomAlertViewController.swift +++ b/ios/MullvadVPN/Classes/CustomAlertViewController.swift @@ -94,11 +94,6 @@ class CustomAlertViewController: UIViewController { } } - override func viewDidDisappear(_ animated: Bool) { - super.viewDidDisappear(animated) - handlers.removeAll() - } - func addAction(title: String, style: ActionStyle, handler: (() -> Void)? = nil) { // The presence of a button should reset any custom button margin to default. containerView.directionalLayoutMargins.bottom = UIMetrics.CustomAlert.containerMargins.bottom @@ -183,8 +178,9 @@ class CustomAlertViewController: UIViewController { if let handler = handlers[button] { handler() } - didDismiss?() + didDismiss = nil + handlers.removeAll() } } } diff --git a/ios/MullvadVPN/Operations/PresentAlertOperation.swift b/ios/MullvadVPN/Operations/PresentAlertOperation.swift index dda17b15af..7dff3399f6 100644 --- a/ios/MullvadVPN/Operations/PresentAlertOperation.swift +++ b/ios/MullvadVPN/Operations/PresentAlertOperation.swift @@ -37,8 +37,8 @@ final class PresentAlertOperation: AsyncOperation { } override func main() { - alertController.didDismiss = { - self.finish() + alertController.didDismiss = { [weak self] in + self?.finish() } presentingController.present(alertController, animated: true) { |
