forked from shadowfacts/Tusker
Fix discover section sometimes appearing on non-Mastodon instances
This commit is contained in:
parent
429dcefa88
commit
3f34357692
|
@ -183,6 +183,9 @@ class ExploreViewController: UIViewController, UICollectionViewDelegate, Collect
|
||||||
if mastodonController.instanceFeatures.trends,
|
if mastodonController.instanceFeatures.trends,
|
||||||
!snapshot.sectionIdentifiers.contains(.discover) {
|
!snapshot.sectionIdentifiers.contains(.discover) {
|
||||||
addDiscoverSection(to: &snapshot)
|
addDiscoverSection(to: &snapshot)
|
||||||
|
} else if !mastodonController.instanceFeatures.trends,
|
||||||
|
snapshot.sectionIdentifiers.contains(.discover) {
|
||||||
|
snapshot.deleteSections([.discover])
|
||||||
}
|
}
|
||||||
self.dataSource.apply(snapshot)
|
self.dataSource.apply(snapshot)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue