IOS-1602 Make sure every VerifiableAccount has access to MMS. IOS-1602
authorDirk Zimmermann <dz@pep.security>
Tue, 28 May 2019 15:38:20 +0200
branchIOS-1602
changeset 883525e9aa9df2a3
parent 8834 ad8eb0a7e341
child 8843 b0cfd9ff7ad0
IOS-1602 Make sure every VerifiableAccount has access to MMS.
pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift
pEpForiOS/UI/ManualLogin/InfoUserSettup/UserInfoTableViewController.swift
pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift
     1.1 --- a/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Tue May 28 15:38:20 2019 +0200
     1.2 +++ b/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Tue May 28 15:38:20 2019 +0200
     1.3 @@ -118,7 +118,8 @@
     1.4              let smtpTransport = ConnectionTransport(
     1.5                  accountSettingsTransport: outgoingServer.transport, smtpPort: outgoingServer.port)
     1.6  
     1.7 -            var newAccount = verifiableAccount ?? VerifiableAccount()
     1.8 +            var newAccount = verifiableAccount ??
     1.9 +                VerifiableAccount(messageModelService: messageModelService)
    1.10  
    1.11              newAccount.verifiableAccountDelegate = self
    1.12              newAccount.address = accountName
     2.1 --- a/pEpForiOS/UI/ManualLogin/InfoUserSettup/UserInfoTableViewController.swift	Tue May 28 15:38:20 2019 +0200
     2.2 +++ b/pEpForiOS/UI/ManualLogin/InfoUserSettup/UserInfoTableViewController.swift	Tue May 28 15:38:20 2019 +0200
     2.3 @@ -26,7 +26,7 @@
     2.4      var responder = 0
     2.5      var accounts = [Account]()
     2.6      
     2.7 -    public var model: VerifiableAccountProtocol = VerifiableAccount()
     2.8 +    public var model = VerifiableAccount()
     2.9  
    2.10      let viewWidthAligner = ViewWidthsAligner()
    2.11  
    2.12 @@ -133,6 +133,7 @@
    2.13          switch segueIdentifier(for: segue) {
    2.14          case .IMAPSettings:
    2.15              if let destination = segue.destination as? IMAPSettingsTableViewController {
    2.16 +                model.messageModelService = appConfig.messageModelService
    2.17                  destination.appConfig = appConfig
    2.18                  destination.model = model
    2.19              }
     3.1 --- a/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Tue May 28 15:38:20 2019 +0200
     3.2 +++ b/pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift	Tue May 28 15:38:20 2019 +0200
     3.3 @@ -119,7 +119,8 @@
     3.4  
     3.5      func update(loginName: String, name: String, password: String? = nil, imap: ServerViewModel,
     3.6                  smtp: ServerViewModel) {
     3.7 -        var theVerifier = verifiableAccount ?? VerifiableAccount()
     3.8 +        var theVerifier = verifiableAccount ??
     3.9 +            VerifiableAccount(messageModelService: messageModelService)
    3.10          verifiableAccount = theVerifier
    3.11  
    3.12          theVerifier.address = email