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