Fix status bar scroll to top not working in single-column navigation on iPad

Closes #296
This commit is contained in:
Shadowfacts 2022-12-10 19:40:05 -05:00
parent 4f48514d1a
commit b3ec259ce9
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ extension SplitNavigationController: StatusBarTappableViewController {
func handleStatusBarTapped(xPosition: CGFloat) -> StatusBarTapActionResult {
let vcs = viewControllers
if !canShowSecondaryNav || vcs.count < 2 {
return (vcs.first! as? StatusBarTappableViewController)?.handleStatusBarTapped(xPosition: xPosition) ?? .continue
return (vcs.last! as? StatusBarTappableViewController)?.handleStatusBarTapped(xPosition: xPosition) ?? .continue
} else {
let positionInRoot = rootNav.view.convert(CGPoint(x: xPosition, y: 0), from: view)
let positionInSecondary = secondaryNav.view.convert(CGPoint(x: xPosition, y: 0), from: view)