|
@@ -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 {
|
|
|
|