diff --git a/Tusker/Screens/Profile/ProfileStatusesViewController.swift b/Tusker/Screens/Profile/ProfileStatusesViewController.swift index e474fc44..a1afd5c3 100644 --- a/Tusker/Screens/Profile/ProfileStatusesViewController.swift +++ b/Tusker/Screens/Profile/ProfileStatusesViewController.swift @@ -266,6 +266,11 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie collectionView.contentInset = .zero } + private func reloadInitial() async { + state = .unloaded + await load() + } + private func tryLoadPinned() async { do { try await loadPinned() @@ -353,10 +358,15 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie return } Task { - // TODO: coalesce these data source updates - // TODO: refresh profile - await controller.loadNewer() - await tryLoadPinned() + if newer == nil { + // no statuses were loaded initially, so reload the initial batch + await reloadInitial() + } else { + // TODO: coalesce these data source updates + // TODO: refresh profile + await controller.loadNewer() + await tryLoadPinned() + } #if !targetEnvironment(macCatalyst) collectionView.refreshControl?.endRefreshing() #endif