|
@@ -107,6 +107,9 @@ class AppCoordinator: NSObject, Coordinator {
|
|
func presentLoginController() {
|
|
func presentLoginController() {
|
|
let accountSetupController = AccountSetupController()
|
|
let accountSetupController = AccountSetupController()
|
|
let accountSetupNav = DCNavigationController(rootViewController: accountSetupController)
|
|
let accountSetupNav = DCNavigationController(rootViewController: accountSetupController)
|
|
|
|
+ let coordinator = AccountSetupCoordinator(navigationController: accountSetupNav)
|
|
|
|
+ childCoordinators.append(coordinator)
|
|
|
|
+ accountSetupController.coordinator = coordinator
|
|
rootViewController.present(accountSetupNav, animated: false, completion: nil)
|
|
rootViewController.present(accountSetupNav, animated: false, completion: nil)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -125,19 +128,8 @@ extension AppCoordinator: UITabBarControllerDelegate {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-extension AppCoordinator: UITabBarDelegate {
|
|
|
|
- func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
|
|
|
|
- print("shouldSelect")
|
|
|
|
- return true
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
|
|
class ContactListCoordinator: Coordinator {
|
|
class ContactListCoordinator: Coordinator {
|
|
let navigationController: UINavigationController
|
|
let navigationController: UINavigationController
|
|
@@ -272,7 +264,6 @@ class AccountSetupCoordinator: Coordinator {
|
|
portSettingsController.onDismiss = {
|
|
portSettingsController.onDismiss = {
|
|
port in
|
|
port in
|
|
MRConfig.mailPort = port
|
|
MRConfig.mailPort = port
|
|
- dc_configure(mailboxPointer)
|
|
|
|
}
|
|
}
|
|
navigationController.pushViewController(portSettingsController, animated: true)
|
|
navigationController.pushViewController(portSettingsController, animated: true)
|
|
}
|
|
}
|
|
@@ -286,7 +277,6 @@ class AccountSetupCoordinator: Coordinator {
|
|
if let secValue = SecurityValue(rawValue: option) {
|
|
if let secValue = SecurityValue(rawValue: option) {
|
|
let value = SecurityConverter.convertValueToInt(type: .IMAPSecurity, value: secValue)
|
|
let value = SecurityConverter.convertValueToInt(type: .IMAPSecurity, value: secValue)
|
|
MRConfig.setImapSecurity(imapFlags: value)
|
|
MRConfig.setImapSecurity(imapFlags: value)
|
|
- dc_configure(mailboxPointer)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
navigationController.pushViewController(securitySettingsController, animated: true)
|
|
navigationController.pushViewController(securitySettingsController, animated: true)
|
|
@@ -299,7 +289,6 @@ class AccountSetupCoordinator: Coordinator {
|
|
portSettingsController.onDismiss = {
|
|
portSettingsController.onDismiss = {
|
|
port in
|
|
port in
|
|
MRConfig.sendPort = port
|
|
MRConfig.sendPort = port
|
|
- dc_configure(mailboxPointer)
|
|
|
|
}
|
|
}
|
|
navigationController.pushViewController(portSettingsController, animated: true)
|
|
navigationController.pushViewController(portSettingsController, animated: true)
|
|
}
|
|
}
|
|
@@ -313,7 +302,6 @@ class AccountSetupCoordinator: Coordinator {
|
|
if let secValue = SecurityValue(rawValue: option) {
|
|
if let secValue = SecurityValue(rawValue: option) {
|
|
let value = SecurityConverter.convertValueToInt(type: .SMTPSecurity, value: secValue)
|
|
let value = SecurityConverter.convertValueToInt(type: .SMTPSecurity, value: secValue)
|
|
MRConfig.setSmtpSecurity(smptpFlags: value)
|
|
MRConfig.setSmtpSecurity(smptpFlags: value)
|
|
- dc_configure(mailboxPointer)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
navigationController.pushViewController(securitySettingsController, animated: true)
|
|
navigationController.pushViewController(securitySettingsController, animated: true)
|