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