From 3f0dd599b3b2d9344d0cf9a3c2af2bb7f42b793c Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 11 Aug 2024 21:28:05 -0700 Subject: [PATCH] Fix compiling with Xcode 16 --- Tusker/Screens/Main/MainSplitViewController.swift | 4 ++-- Tusker/Screens/Main/MainTabBarViewController.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tusker/Screens/Main/MainSplitViewController.swift b/Tusker/Screens/Main/MainSplitViewController.swift index 6fafe047..24bd1670 100644 --- a/Tusker/Screens/Main/MainSplitViewController.swift +++ b/Tusker/Screens/Main/MainSplitViewController.swift @@ -447,10 +447,10 @@ extension MainSplitViewController: UISplitViewControllerDelegate { } // Transfer the selected tab from the tab bar VC to the sidebar - switch tabBarViewController.selectedTab { + switch tabBarViewController.currentTab { case .timelines, .notifications, .myProfile: // 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) doSelect(item: item) diff --git a/Tusker/Screens/Main/MainTabBarViewController.swift b/Tusker/Screens/Main/MainTabBarViewController.swift index 2216542b..cbf00b12 100644 --- a/Tusker/Screens/Main/MainTabBarViewController.swift +++ b/Tusker/Screens/Main/MainTabBarViewController.swift @@ -21,7 +21,7 @@ class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate { private var fastSwitcherConstraints: [NSLayoutConstraint] = [] #endif - var selectedTab: Tab { + var currentTab: Tab { return Tab(rawValue: selectedIndex)! } @@ -353,7 +353,7 @@ extension MainTabBarViewController: TuskerRootViewController { guard presentedViewController == nil else { return .stop } - guard let vc = viewController(for: selectedTab) as? StatusBarTappableViewController else { + guard let vc = viewController(for: currentTab) as? StatusBarTappableViewController else { return .continue } return vc.handleStatusBarTapped(xPosition: xPosition)