diff --git a/Tusker/Screens/Main/MainSplitViewController.swift b/Tusker/Screens/Main/MainSplitViewController.swift index 6fafe04793..24bd1670cc 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 2216542b93..cbf00b12de 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)