[Fix]: operate on UI controls in main thread

This commit is contained in:
Magesh K
2024-12-28 02:12:03 +05:30
committed by June
parent ff1defeec5
commit f6482eb06e

View File

@@ -555,6 +555,7 @@ private extension AuthenticationOperation
}
}
DispatchQueue.main.async {
let alertController = UIAlertController(title: NSLocalizedString("Would you like to revoke your previous certificates?\n\(certsText)", comment: ""), message: nil, preferredStyle: .alert)
let noAction = UIAlertAction(title: NSLocalizedString("No", comment: ""), style: .default) { (action) in
@@ -574,7 +575,6 @@ private extension AuthenticationOperation
alertController.addAction(noAction)
alertController.addAction(yesAction)
DispatchQueue.main.async {
if self.navigationController.presentingViewController != nil
{
self.navigationController.present(alertController, animated: true, completion: nil)