|
@@ -121,9 +121,9 @@ extension AppCoordinator: UITabBarControllerDelegate {
|
|
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
|
|
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
|
|
if let dcNav = viewController as? DCNavigationController {
|
|
if let dcNav = viewController as? DCNavigationController {
|
|
switch tabBarController.selectedIndex {
|
|
switch tabBarController.selectedIndex {
|
|
- case 0,3,4:
|
|
|
|
|
|
+ case 0, 3, 4:
|
|
dcNav.navigationBar.prefersLargeTitles = true
|
|
dcNav.navigationBar.prefersLargeTitles = true
|
|
- case 1,2:
|
|
|
|
|
|
+ case 1, 2:
|
|
dcNav.navigationBar.prefersLargeTitles = false
|
|
dcNav.navigationBar.prefersLargeTitles = false
|
|
default:
|
|
default:
|
|
// should never get here
|
|
// should never get here
|
|
@@ -231,7 +231,7 @@ class ChatListCoordinator: Coordinator {
|
|
class SettingsCoordinator: Coordinator {
|
|
class SettingsCoordinator: Coordinator {
|
|
let navigationController: UINavigationController
|
|
let navigationController: UINavigationController
|
|
|
|
|
|
- var childCoordinators:[Coordinator] = []
|
|
|
|
|
|
+ var childCoordinators: [Coordinator] = []
|
|
|
|
|
|
init(navigationController: UINavigationController) {
|
|
init(navigationController: UINavigationController) {
|
|
self.navigationController = navigationController
|
|
self.navigationController = navigationController
|
|
@@ -271,7 +271,9 @@ class AccountSetupCoordinator: Coordinator {
|
|
func showImapPortOptions() {
|
|
func showImapPortOptions() {
|
|
let currentMailPort = DCConfig.mailPort ?? DCConfig.configuredMailPort
|
|
let currentMailPort = DCConfig.mailPort ?? DCConfig.configuredMailPort
|
|
let currentPort = Int(currentMailPort)
|
|
let currentPort = Int(currentMailPort)
|
|
- let portSettingsController = PortSettingsController(sectionTitle: String.localized("login_imap_port"), ports: [143, 993], currentPort: currentPort)
|
|
|
|
|
|
+ let portSettingsController = PortSettingsController(sectionTitle: String.localized("login_imap_port"),
|
|
|
|
+ ports: [143, 993],
|
|
|
|
+ currentPort: currentPort)
|
|
portSettingsController.onDismiss = {
|
|
portSettingsController.onDismiss = {
|
|
port in
|
|
port in
|
|
DCConfig.mailPort = port
|
|
DCConfig.mailPort = port
|
|
@@ -298,7 +300,9 @@ class AccountSetupCoordinator: Coordinator {
|
|
func showSmtpPortsOptions() {
|
|
func showSmtpPortsOptions() {
|
|
let currentMailPort = DCConfig.sendPort ?? DCConfig.configuredSendPort
|
|
let currentMailPort = DCConfig.sendPort ?? DCConfig.configuredSendPort
|
|
let currentPort = Int(currentMailPort)
|
|
let currentPort = Int(currentMailPort)
|
|
- let portSettingsController = PortSettingsController(sectionTitle: String.localized("login_smtp_port"), ports: [25, 465, 587], currentPort: currentPort)
|
|
|
|
|
|
+ let portSettingsController = PortSettingsController(sectionTitle: String.localized("login_smtp_port"),
|
|
|
|
+ ports: [25, 465, 587],
|
|
|
|
+ currentPort: currentPort)
|
|
portSettingsController.onDismiss = {
|
|
portSettingsController.onDismiss = {
|
|
port in
|
|
port in
|
|
DCConfig.sendPort = port
|
|
DCConfig.sendPort = port
|
|
@@ -449,7 +453,7 @@ class ChatViewCoordinator: NSObject, Coordinator {
|
|
// navigationController.present(nav, animated: true, completion: nil)
|
|
// navigationController.present(nav, animated: true, completion: nil)
|
|
}
|
|
}
|
|
|
|
|
|
- private func sendImage(_ image:UIImage) {
|
|
|
|
|
|
+ private func sendImage(_ image: UIImage) {
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
if let compressedImage = image.dcCompress() {
|
|
if let compressedImage = image.dcCompress() {
|
|
// at this point image is compressed by 85% by default
|
|
// at this point image is compressed by 85% by default
|