diff --git a/Tusker/Screens/Profile/ProfileStatusesViewController.swift b/Tusker/Screens/Profile/ProfileStatusesViewController.swift index ed593ac5..d70e4599 100644 --- a/Tusker/Screens/Profile/ProfileStatusesViewController.swift +++ b/Tusker/Screens/Profile/ProfileStatusesViewController.swift @@ -41,16 +41,6 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie self.controller = TimelineLikeController(delegate: self) - mastodonController.persistentContainer.accountSubject - .receive(on: DispatchQueue.main) - .filter { [unowned self] in $0 == self.accountID } - .sink { [unowned self] id in - var snapshot = dataSource.snapshot() - snapshot.reconfigureItems([.header(id)]) - dataSource.apply(snapshot, animatingDifferences: true) - } - .store(in: &cancellables) - addKeyCommand(MenuController.refreshCommand(discoverabilityTitle: "Refresh Profile")) } @@ -97,7 +87,16 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie override func viewDidLoad() { super.viewDidLoad() - + + mastodonController.persistentContainer.accountSubject + .receive(on: DispatchQueue.main) + .filter { [unowned self] in $0 == self.accountID } + .sink { [unowned self] id in + var snapshot = dataSource.snapshot() + snapshot.reconfigureItems([.header(id)]) + dataSource.apply(snapshot, animatingDifferences: true) + } + .store(in: &cancellables) } private func createDataSource() -> UICollectionViewDiffableDataSource {