Fix intro transition on iPad with connected keyboard

This commit is contained in:
Ilya Laktyushin 2022-09-15 14:09:36 +03:00
parent 85b17d5aec
commit af9f5c2bfa
2 changed files with 8 additions and 3 deletions

View File

@ -155,8 +155,8 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
let _ = TelegramEngineUnauthorized(account: strongSelf.account).auth.setState(state: UnauthorizedAccountState(isTestingEnvironment: strongSelf.account.testingEnvironment, masterDatacenterId: strongSelf.account.masterDatacenterId, contents: .empty)).start()
}
})
if let splahController = splashController {
controller.animateWithSplashController(splahController)
if let splashController = splashController {
controller.animateWithSplashController(splashController)
}
controller.accountUpdated = { [weak self] updatedAccount in
guard let strongSelf = self else {
@ -1033,6 +1033,11 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
break
}
}
if let validLayout = self.validLayout, case .tablet = validLayout.deviceMetrics.type {
previousSplashController = nil
}
controllers.append(self.phoneEntryController(countryCode: countryCode, number: number, splashController: previousSplashController))
self.setViewControllers(controllers, animated: !self.viewControllers.isEmpty && (previousSplashController == nil || self.viewControllers.count > 2))
case let .confirmationCodeEntry(number, type, _, timeout, nextType, _):

View File

@ -158,7 +158,7 @@ open class NavigationController: UINavigationController, ContainableController,
private var globalOverlayContainerParent: GlobalOverlayContainerParent?
public var globalOverlayControllersUpdated: (() -> Void)?
private var validLayout: ContainerViewLayout?
public private(set) var validLayout: ContainerViewLayout?
private var validStatusBarStyle: NavigationStatusBarStyle?
private var validStatusBarHidden: Bool = false