forked from shadowfacts/Tusker
parent
2fc889a5f9
commit
33c641cd85
@ -490,6 +490,18 @@ extension NewMainTabBarViewController: UITabBarControllerDelegate {
|
||||
}
|
||||
|
||||
func tabBarController(_ tabBarController: UITabBarController, didSelectTab newTab: UITab, previousTab: UITab?) {
|
||||
// Workaround for FB16476036 (visionOS: tabBarController(_:shouldSelectTab:) delegate method not called)
|
||||
#if os(visionOS)
|
||||
if let previousTab,
|
||||
newTab.identifier == Tab.compose.rawValue {
|
||||
compose(editing: nil)
|
||||
DispatchQueue.main.async {
|
||||
self.selectedTab = previousTab
|
||||
}
|
||||
return
|
||||
}
|
||||
#endif
|
||||
|
||||
self.updateViewControllerSafeAreaInsets(newTab.viewController!)
|
||||
|
||||
// All tabs in a tab group deliberately share the same view controller, so we have to do this ourselves.
|
||||
|
Loading…
x
Reference in New Issue
Block a user