diff --git a/Tusker/Screens/Profile/ProfileViewController.swift b/Tusker/Screens/Profile/ProfileViewController.swift index 0653acb7..08347e4d 100644 --- a/Tusker/Screens/Profile/ProfileViewController.swift +++ b/Tusker/Screens/Profile/ProfileViewController.swift @@ -78,8 +78,6 @@ class ProfileViewController: UIPageViewController { } navigationItem.rightBarButtonItem = composeButton - userActivity = UserActivityManager.showProfileActivity(id: accountID!, accountID: mastodonController.accountInfo!.id) - headerView = ProfileHeaderView.create() headerView.delegate = self @@ -132,6 +130,10 @@ class ProfileViewController: UIPageViewController { 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 headerView?.updateUI(for: accountID) navigationItem.title = account.displayNameWithoutCustomEmoji