diff --git a/Ring/Ring/Services/AccountsService.swift b/Ring/Ring/Services/AccountsService.swift index dc3f27de101e64c0dca12ed0a762b8b50b4767a2..ed03f85e3362afe5b7cb324998df40e2eaf95b0a 100644 --- a/Ring/Ring/Services/AccountsService.swift +++ b/Ring/Ring/Services/AccountsService.swift @@ -850,10 +850,14 @@ class AccountsService: AccountAdapterDelegate { name = accountDetails.get(withConfigKeyModel: ConfigKeyModel(withKey: ConfigKey.displayName)) } - guard let accountToUpdate = self.getAccount(fromAccountId: account), - let accountURI = AccountModelHelper - .init(withAccount: accountToUpdate).uri else {return} - _ = self.dbManager.saveAccountProfile(alias: name, photo: photo, accountId: account, accountURI: accountURI) + self.getAccountFromDaemon(fromAccountId: account) + .subscribe(onSuccess: { [weak self] accountToUpdate in + guard let self = self, let accountURI = AccountModelHelper + .init(withAccount: accountToUpdate).uri else { + return + } + _ = self.dbManager.saveAccountProfile(alias: name, photo: photo, accountId: account, accountURI: accountURI) + }).disposed(by: self.disposeBag) } // MARK: Push Notifications