Don't dismiss payment controller with Apple Pay

This commit is contained in:
Ali 2021-12-10 20:52:53 +04:00
parent f3eaa9fecd
commit af9a417798

View File

@ -11,6 +11,7 @@ import TelegramUIPreferences
import ImageBlur
import FastBlur
import AppLockState
import PassKit
private func isLocked(passcodeSettings: PresentationPasscodeSettings, state: LockState, isApplicationActive: Bool) -> Bool {
if state.isManuallyLocked {
@ -204,6 +205,7 @@ public final class AppLockContextImpl: AppLockContext {
strongSelf.passcodeController = passcodeController
if let rootViewController = strongSelf.rootController {
if let _ = rootViewController.presentedViewController as? UIActivityViewController {
} else if let _ = rootViewController.presentedViewController as? PKPaymentAuthorizationViewController {
} else {
rootViewController.dismiss(animated: false, completion: nil)
}
@ -228,6 +230,7 @@ public final class AppLockContextImpl: AppLockContext {
if let rootViewController = strongSelf.rootController {
if let _ = rootViewController.presentedViewController as? UIActivityViewController {
} else if let _ = rootViewController.presentedViewController as? PKPaymentAuthorizationViewController {
} else {
rootViewController.dismiss(animated: false, completion: nil)
}