mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Various fixes
This commit is contained in:
@@ -563,7 +563,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var previousOverlayContainer: NavigationOverlayContainer?
|
||||
for i in (0 ..< self.overlayContainers.count).reversed() {
|
||||
let overlayContainer = self.overlayContainers[i]
|
||||
@@ -1020,6 +1020,7 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
self.statusBarHost?.setStatusBarHidden(statusBarHidden, animated: animateStatusBarStyleTransition)
|
||||
}
|
||||
|
||||
var topHasOpaque = false
|
||||
var foundControllerInFocus = false
|
||||
for container in self.overlayContainers.reversed() {
|
||||
if foundControllerInFocus {
|
||||
@@ -1028,6 +1029,16 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
foundControllerInFocus = true
|
||||
container.controller.isInFocus = true
|
||||
}
|
||||
|
||||
let controller = container.controller
|
||||
if topHasOpaque {
|
||||
controller.displayNode.accessibilityElementsHidden = true
|
||||
} else {
|
||||
if controller.isOpaqueWhenInOverlay || controller.blocksBackgroundWhenInOverlay {
|
||||
topHasOpaque = true
|
||||
}
|
||||
controller.displayNode.accessibilityElementsHidden = false
|
||||
}
|
||||
}
|
||||
|
||||
for container in self.modalContainers.reversed() {
|
||||
@@ -1037,6 +1048,17 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
foundControllerInFocus = true
|
||||
container.container.isInFocus = true
|
||||
}
|
||||
|
||||
if let controller = container.container.controllers.last {
|
||||
if topHasOpaque {
|
||||
controller.displayNode.accessibilityElementsHidden = true
|
||||
} else {
|
||||
if controller.isOpaqueWhenInOverlay || controller.blocksBackgroundWhenInOverlay {
|
||||
topHasOpaque = true
|
||||
}
|
||||
controller.displayNode.accessibilityElementsHidden = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let rootContainer = self.rootContainer {
|
||||
@@ -1048,6 +1070,17 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
foundControllerInFocus = true
|
||||
container.isInFocus = true
|
||||
}
|
||||
|
||||
if let controller = container.controllers.last {
|
||||
if topHasOpaque {
|
||||
controller.displayNode.accessibilityElementsHidden = true
|
||||
} else {
|
||||
if controller.isOpaqueWhenInOverlay || controller.blocksBackgroundWhenInOverlay {
|
||||
topHasOpaque = true
|
||||
}
|
||||
controller.displayNode.accessibilityElementsHidden = false
|
||||
}
|
||||
}
|
||||
case let .split(split):
|
||||
if foundControllerInFocus {
|
||||
split.isInFocus = false
|
||||
@@ -1055,6 +1088,27 @@ open class NavigationController: UINavigationController, ContainableController,
|
||||
foundControllerInFocus = true
|
||||
split.isInFocus = true
|
||||
}
|
||||
|
||||
if let controller = split.masterControllers.last {
|
||||
if topHasOpaque {
|
||||
controller.displayNode.accessibilityElementsHidden = true
|
||||
} else {
|
||||
if controller.isOpaqueWhenInOverlay || controller.blocksBackgroundWhenInOverlay {
|
||||
topHasOpaque = true
|
||||
}
|
||||
controller.displayNode.accessibilityElementsHidden = false
|
||||
}
|
||||
}
|
||||
if let controller = split.detailControllers.last {
|
||||
if topHasOpaque {
|
||||
controller.displayNode.accessibilityElementsHidden = true
|
||||
} else {
|
||||
if controller.isOpaqueWhenInOverlay || controller.blocksBackgroundWhenInOverlay {
|
||||
topHasOpaque = true
|
||||
}
|
||||
controller.displayNode.accessibilityElementsHidden = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user