Remove UITabBarController workaround on iOS 18.1
This commit is contained in:
parent
f4b51c06c1
commit
12bab71b17
|
@ -454,6 +454,7 @@ extension NewMainTabBarViewController {
|
||||||
extension NewMainTabBarViewController: UITabBarControllerDelegate {
|
extension NewMainTabBarViewController: UITabBarControllerDelegate {
|
||||||
func tabBarController(_ tabBarController: UITabBarController, shouldSelectTab tab: UITab) -> Bool {
|
func tabBarController(_ tabBarController: UITabBarController, shouldSelectTab tab: UITab) -> Bool {
|
||||||
if tab.identifier == Tab.compose.rawValue {
|
if tab.identifier == Tab.compose.rawValue {
|
||||||
|
if #unavailable(iOS 18.1) {
|
||||||
let currentTab = selectedTab
|
let currentTab = selectedTab
|
||||||
// returning false for shouldSelectTab doesn't prevent the UITabBar from being updated (FB14857254)
|
// returning false for shouldSelectTab doesn't prevent the UITabBar from being updated (FB14857254)
|
||||||
// returning false and then setting selectedTab=tab and selectedTab=currentTab seems to leave things in a bad state (currentTab's VC is on screen but in the disappeared state)
|
// returning false and then setting selectedTab=tab and selectedTab=currentTab seems to leave things in a bad state (currentTab's VC is on screen but in the disappeared state)
|
||||||
|
@ -463,6 +464,10 @@ extension NewMainTabBarViewController: UITabBarControllerDelegate {
|
||||||
}
|
}
|
||||||
compose(editing: nil)
|
compose(editing: nil)
|
||||||
return true
|
return true
|
||||||
|
} else {
|
||||||
|
compose(editing: nil)
|
||||||
|
return false
|
||||||
|
}
|
||||||
} else if let selectedTab,
|
} else if let selectedTab,
|
||||||
selectedTab == tab,
|
selectedTab == tab,
|
||||||
let nav = selectedViewController as? any NavigationControllerProtocol {
|
let nav = selectedViewController as? any NavigationControllerProtocol {
|
||||||
|
|
Loading…
Reference in New Issue