Fix profile screen title not being set

This commit is contained in:
Shadowfacts 2020-09-13 15:34:45 -04:00
parent b94bfca406
commit ab4bcfa50f
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 0 deletions

View File

@ -86,6 +86,7 @@ class ProfileViewController: UIPageViewController {
if mastodonController.persistentContainer.account(for: accountID) != nil {
headerView.updateUI(for: accountID)
updateAccountUI()
} else {
let req = Client.getAccount(id: accountID)
mastodonController.run(req) { [weak self] (response) in
@ -93,6 +94,7 @@ class ProfileViewController: UIPageViewController {
guard case let .success(account, _) = response else { fatalError() }
self.mastodonController.persistentContainer.addOrUpdate(account: account, incrementReferenceCount: true) { (account) in
DispatchQueue.main.async {
self.updateAccountUI()
self.headerView.updateUI(for: self.accountID)
self.pageControllers.forEach {
$0.updateUI(account: account)