AuthenticationOperation: fix 2FA code not being displayed

Bandaid fix, it would be better to have the alert in ConnectAppleIDView
This commit is contained in:
naturecodevoid
2023-02-14 08:20:16 -08:00
parent c2e89b09ea
commit e7ff6496c1

View File

@@ -417,14 +417,15 @@ private extension AuthenticationOperation
completionHandler(nil)
})
// if self.navigationController.presentingViewController != nil
// {
// self.navigationController.present(alertController, animated: true, completion: nil)
// }
// else
// {
// presentingViewController.present(alertController, animated: true, completion: nil)
// }
let keyWindow = UIApplication.shared.windows.filter { $0.isKeyWindow }.first
if var topController = keyWindow?.rootViewController {
while let presentedViewController = topController.presentedViewController {
topController = presentedViewController
}
topController.present(alertController, animated: true, completion: nil)
}
}
}
// }