forked from shadowfacts/Tusker
Fix Trending Posts appearing to reload forever
This commit is contained in:
parent
2891f47cb3
commit
382d8ef2c8
|
@ -85,14 +85,14 @@ class TrendingStatusesViewController: UIViewController {
|
|||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
if !loaded {
|
||||
loaded = true
|
||||
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
|
||||
snapshot.appendSections([.statuses])
|
||||
snapshot.appendItems([.loadingIndicator])
|
||||
dataSource.apply(snapshot, animatingDifferences: false)
|
||||
|
||||
Task {
|
||||
if !loaded {
|
||||
loaded = true
|
||||
await loadTrendingStatuses()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue