mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 00:21:12 +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 {
|
if let tabController = strongSelf.rootController.rootTabController {
|
||||||
let selectedController = tabController.controllers[tabController.selectedIndex]
|
let selectedController = tabController.controllers[tabController.selectedIndex]
|
||||||
|
|
||||||
|
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) {
|
if !f(selectedController) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let controller = strongSelf.rootController.topViewController as? ViewController, controller !== selectedController {
|
if let controller = strongSelf.rootController.topViewController as? ViewController, controller !== selectedController {
|
||||||
if !f(controller) {
|
if !f(controller) {
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user