IOS-1542 IMAP first!. IOS-1542
authorDirk Zimmermann <dz@pep.security>
Thu, 25 Apr 2019 16:25:40 +0200
branchIOS-1542
changeset 8373ecdd11870f06
parent 8370 fe4ff6f43d1e
child 8374 0bfb3112a735
IOS-1542 IMAP first!.
pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift
     1.1 --- a/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Wed Apr 24 12:43:18 2019 +0200
     1.2 +++ b/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Thu Apr 25 16:25:40 2019 +0200
     1.3 @@ -52,6 +52,15 @@
     1.4          self.loginName = account.server(with: .imap)?.credentials.loginName ?? ""
     1.5          self.name = account.user.userName ?? ""
     1.6  
     1.7 +        if let server = account.imapServer {
     1.8 +            self.imapServer = ServerViewModel(
     1.9 +                address: server.address,
    1.10 +                port: "\(server.port)",
    1.11 +                transport: server.transport?.asString())
    1.12 +        } else {
    1.13 +            self.imapServer = ServerViewModel()
    1.14 +        }
    1.15 +
    1.16          if let server = account.smtpServer {
    1.17              self.smtpServer = ServerViewModel(
    1.18                  address: server.address,
    1.19 @@ -60,15 +69,6 @@
    1.20          } else {
    1.21              self.smtpServer = ServerViewModel()
    1.22          }
    1.23 -
    1.24 -        if let server = account.imapServer {
    1.25 -            self.imapServer = ServerViewModel(
    1.26 -                address: server.address,
    1.27 -                port: "\(server.port)",
    1.28 -                transport: server.transport?.asString())
    1.29 -        } else {
    1.30 -            self.imapServer = ServerViewModel()
    1.31 -        }
    1.32      }
    1.33  
    1.34      private(set) var email: String