瀏覽代碼

remove UITabBarControllerDelegate extension from AppCoordinator

cyberta 5 年之前
父節點
當前提交
1a8ee9875f
共有 1 個文件被更改,包括 0 次插入17 次删除
  1. 0 17
      deltachat-ios/Coordinator/AppCoordinator.swift

+ 0 - 17
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -21,7 +21,6 @@ class AppCoordinator: NSObject, Coordinator {
         let tabBarController = UITabBarController()
         tabBarController.viewControllers = [mailboxController, qrController, chatListController, settingsController]
         // put viewControllers here
-        tabBarController.delegate = self
         tabBarController.tabBar.tintColor = DcColors.primary
         tabBarController.tabBar.backgroundColor = .white
         return tabBarController
@@ -112,22 +111,6 @@ class AppCoordinator: NSObject, Coordinator {
     }
 }
 
-extension AppCoordinator: UITabBarControllerDelegate {
-    func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
-        if let dcNav = viewController as? DcNavigationController {
-            switch tabBarController.selectedIndex {
-            case chatsTab, settingsTab:
-                dcNav.navigationBar.prefersLargeTitles = true
-            case mailboxTab, qrTab:
-                dcNav.navigationBar.prefersLargeTitles = false
-            default:
-                // should never get here
-                dcNav.navigationBar.prefersLargeTitles = false
-            }
-        }
-    }
-}
-
 // since mailbox and chatView -tab both use ChatViewController we want to be able to assign different functionality via coordinators -> therefore we override unneeded functions such as showChatDetail -> maybe find better solution in longterm
 class MailboxCoordinator: ChatViewCoordinator {