Fix crash when sidebar collapses
This commit is contained in:
parent
56b51f944d
commit
c7b708e62b
|
@ -78,8 +78,6 @@ class ProfileViewController: UIPageViewController {
|
||||||
}
|
}
|
||||||
navigationItem.rightBarButtonItem = composeButton
|
navigationItem.rightBarButtonItem = composeButton
|
||||||
|
|
||||||
userActivity = UserActivityManager.showProfileActivity(id: accountID!, accountID: mastodonController.accountInfo!.id)
|
|
||||||
|
|
||||||
headerView = ProfileHeaderView.create()
|
headerView = ProfileHeaderView.create()
|
||||||
headerView.delegate = self
|
headerView.delegate = self
|
||||||
|
|
||||||
|
@ -132,6 +130,10 @@ class ProfileViewController: UIPageViewController {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let currentAccountID = mastodonController.accountInfo?.id {
|
||||||
|
userActivity = UserActivityManager.showProfileActivity(id: accountID, accountID: currentAccountID)
|
||||||
|
}
|
||||||
|
|
||||||
// Optionally invoke updateUI on headerView because viewDidLoad may not have been called yet
|
// Optionally invoke updateUI on headerView because viewDidLoad may not have been called yet
|
||||||
headerView?.updateUI(for: accountID)
|
headerView?.updateUI(for: accountID)
|
||||||
navigationItem.title = account.displayNameWithoutCustomEmoji
|
navigationItem.title = account.displayNameWithoutCustomEmoji
|
||||||
|
|
Loading…
Reference in New Issue