Refactor++ (not yet there)
authorHern?ni Marques <hernani@pep-project.org>
Tue, 25 Oct 2016 12:31:22 +0200
changeset 869c3e6646e724f
parent 866 64469bc6c9a2
child 871 558198de2771
Refactor++ (not yet there)
pEpForiOS/Background/EncryptAndSend/SendMailOperation.swift
pEpForiOS/Models/Account+Extension.swift
pEpForiOS/UI/AccountsAndFolders/AccountsFoldersTableViewController.swift
     1.1 --- a/pEpForiOS/Background/EncryptAndSend/SendMailOperation.swift	Tue Oct 25 01:34:01 2016 +0200
     1.2 +++ b/pEpForiOS/Background/EncryptAndSend/SendMailOperation.swift	Tue Oct 25 12:31:22 2016 +0200
     1.3 @@ -37,7 +37,7 @@
     1.4  
     1.5      override open func main() {
     1.6          let privateMOC = encryptionData.coreDataUtil.privateContext()
     1.7 -        var connectInfo: ImapSmtpConnectInfo? = nil
     1.8 +        var connectInfo: EmailConnectInfo? = nil
     1.9          privateMOC.perform() {
    1.10              let model = CdModel.init(context: privateMOC)
    1.11              guard let account = model.accountByEmail(self.encryptionData.accountEmail) else {
     2.1 --- a/pEpForiOS/Models/Account+Extension.swift	Tue Oct 25 01:34:01 2016 +0200
     2.2 +++ b/pEpForiOS/Models/Account+Extension.swift	Tue Oct 25 12:31:22 2016 +0200
     2.3 @@ -11,7 +11,7 @@
     2.4  import MessageModel
     2.5  
     2.6  extension Account {
     2.7 -    open var connectInfo: ImapSmtpConnectInfo? {
     2.8 +    open var connectInfo: EmailConnectInfo? {
     2.9          var potentialImapServer: Server?
    2.10          var potentialSmtpServer: Server?
    2.11          for server in servers {
    2.12 @@ -37,7 +37,9 @@
    2.13          let passSmtp = KeyChain.getPassword(user.address,
    2.14                                              serverType: Server.ServerType.smtp.asString())
    2.15  
    2.16 -        return ImapSmtpConnectInfo.init(
    2.17 +        return EmailConnectInfo.init() // Caution: No specific values are initialized.
    2.18 +        /* DEPRECATED
    2.19 +        return EmailConnectInfo.init(
    2.20              nameOfTheUser: userName,
    2.21              email: user.address, imapUsername: imapServer.userName,
    2.22              smtpUsername: smtpServer.userName,
    2.23 @@ -48,5 +50,6 @@
    2.24              smtpServerName: smtpServer.address,
    2.25              smtpServerPort: UInt16(smtpServer.port),
    2.26              smtpTransport: smtpServer.transport?.connectionTransport ?? .startTLS)
    2.27 +         */
    2.28      }
    2.29  }
     3.1 --- a/pEpForiOS/UI/AccountsAndFolders/AccountsFoldersTableViewController.swift	Tue Oct 25 01:34:01 2016 +0200
     3.2 +++ b/pEpForiOS/UI/AccountsAndFolders/AccountsFoldersTableViewController.swift	Tue Oct 25 12:31:22 2016 +0200
     3.3 @@ -119,7 +119,7 @@
     3.4              return
     3.5          }
     3.6  
     3.7 -        var connectInfos = [ImapSmtpConnectInfo]()
     3.8 +        var connectInfos = [EmailConnectInfo]()
     3.9          for ac in accounts {
    3.10              if let ci = ac.connectInfo {
    3.11                  connectInfos.append(ci)