mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 16:06:59 +00:00
Fix key command traversal
This commit is contained in:
parent
c7e8de6a17
commit
bbe4a24262
@ -148,9 +148,31 @@ final class AuthorizedApplicationContext {
|
||||
}
|
||||
if let tabController = strongSelf.rootController.rootTabController {
|
||||
let selectedController = tabController.controllers[tabController.selectedIndex]
|
||||
if !f(selectedController) {
|
||||
return
|
||||
|
||||
if let index = strongSelf.rootController.viewControllers.lastIndex(where: { controller in
|
||||
guard let controller = controller as? ViewController else {
|
||||
return false
|
||||
}
|
||||
if controller === tabController {
|
||||
return false
|
||||
}
|
||||
switch controller.navigationPresentation {
|
||||
case .master:
|
||||
return true
|
||||
default:
|
||||
break
|
||||
}
|
||||
return false
|
||||
}), let controller = strongSelf.rootController.viewControllers[index] as? ViewController {
|
||||
if !f(controller) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if !f(selectedController) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if let controller = strongSelf.rootController.topViewController as? ViewController, controller !== selectedController {
|
||||
if !f(controller) {
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user