Fix compiling with Xcode 16

This commit is contained in:
Shadowfacts 2024-08-11 21:28:05 -07:00
parent 71fd804fd7
commit ff433c4270
2 changed files with 4 additions and 4 deletions

View File

@ -447,10 +447,10 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
} }
// Transfer the selected tab from the tab bar VC to the sidebar // Transfer the selected tab from the tab bar VC to the sidebar
switch tabBarViewController.selectedTab { switch tabBarViewController.currentTab {
case .timelines, .notifications, .myProfile: case .timelines, .notifications, .myProfile:
// These tabs map 1 <-> 1 with sidebar items // These tabs map 1 <-> 1 with sidebar items
let item = MainSidebarViewController.Item.tab(tabBarViewController.selectedTab) let item = MainSidebarViewController.Item.tab(tabBarViewController.currentTab)
sidebar.select(item: item, animated: false) sidebar.select(item: item, animated: false)
doSelect(item: item) doSelect(item: item)

View File

@ -21,7 +21,7 @@ class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate {
private var fastSwitcherConstraints: [NSLayoutConstraint] = [] private var fastSwitcherConstraints: [NSLayoutConstraint] = []
#endif #endif
var selectedTab: Tab { var currentTab: Tab {
return Tab(rawValue: selectedIndex)! return Tab(rawValue: selectedIndex)!
} }
@ -353,7 +353,7 @@ extension MainTabBarViewController: TuskerRootViewController {
guard presentedViewController == nil else { guard presentedViewController == nil else {
return .stop return .stop
} }
guard let vc = viewController(for: selectedTab) as? StatusBarTappableViewController else { guard let vc = viewController(for: currentTab) as? StatusBarTappableViewController else {
return .continue return .continue
} }
return vc.handleStatusBarTapped(xPosition: xPosition) return vc.handleStatusBarTapped(xPosition: xPosition)