Fix profile screen title not being set
This commit is contained in:
parent
b94bfca406
commit
ab4bcfa50f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue