pEpForiOS/UI/Settings/Setting/AccountSettings/ViewModel/AccountSettingsViewModel.swift
branchIOS-1542
changeset 8381 907e287ead66
parent 8376 f517a983ae7c
child 8382 855ff0a20d53
equal deleted inserted replaced
8380:fd237aaceec6 8381:907e287ead66
   193         return server
   193         return server
   194     }
   194     }
   195 
   195 
   196     func updateToken(accessToken: OAuth2AccessTokenProtocol) {
   196     func updateToken(accessToken: OAuth2AccessTokenProtocol) {
   197         self.accessToken = accessToken
   197         self.accessToken = accessToken
   198     }
       
   199 }
       
   200 
       
   201 // MARK: - AccountVerificationServiceDelegate
       
   202 
       
   203 extension AccountSettingsViewModel: AccountVerificationServiceDelegate {
       
   204     public func verified(account: Account,
       
   205                   service: AccountVerificationServiceProtocol,
       
   206                   result: AccountVerificationResult) {
       
   207         if result == .ok {
       
   208             MessageModelUtil.performAndWait {
       
   209                 account.save()
       
   210             }
       
   211         }
       
   212         GCD.onMainWait { [weak self] in
       
   213             guard let me = self else {
       
   214                 Logger.frontendLogger.lostMySelf()
       
   215                 return
       
   216             }
       
   217             me.delegate?.didVerify(result: result, accountInput: nil)
       
   218         }
       
   219     }
   198     }
   220 }
   199 }
   221 
   200 
   222 // MARK: - VerifiableAccountDelegate
   201 // MARK: - VerifiableAccountDelegate
   223 
   202