diff --git a/Tusker/Screens/Explore/TrendingStatusesViewController.swift b/Tusker/Screens/Explore/TrendingStatusesViewController.swift index 988c5302..34bb2a1d 100644 --- a/Tusker/Screens/Explore/TrendingStatusesViewController.swift +++ b/Tusker/Screens/Explore/TrendingStatusesViewController.swift @@ -85,14 +85,14 @@ class TrendingStatusesViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - var snapshot = NSDiffableDataSourceSnapshot() - snapshot.appendSections([.statuses]) - snapshot.appendItems([.loadingIndicator]) - dataSource.apply(snapshot, animatingDifferences: false) - - Task { - if !loaded { - loaded = true + if !loaded { + loaded = true + var snapshot = NSDiffableDataSourceSnapshot() + snapshot.appendSections([.statuses]) + snapshot.appendItems([.loadingIndicator]) + dataSource.apply(snapshot, animatingDifferences: false) + + Task { await loadTrendingStatuses() } }