From 3f343576928df1c2cc499f648b490a350218450a Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 5 Feb 2023 14:36:09 -0500 Subject: [PATCH] Fix discover section sometimes appearing on non-Mastodon instances --- Tusker/Screens/Explore/ExploreViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tusker/Screens/Explore/ExploreViewController.swift b/Tusker/Screens/Explore/ExploreViewController.swift index 03580dac..b2244796 100644 --- a/Tusker/Screens/Explore/ExploreViewController.swift +++ b/Tusker/Screens/Explore/ExploreViewController.swift @@ -183,6 +183,9 @@ class ExploreViewController: UIViewController, UICollectionViewDelegate, Collect if mastodonController.instanceFeatures.trends, !snapshot.sectionIdentifiers.contains(.discover) { addDiscoverSection(to: &snapshot) + } else if !mastodonController.instanceFeatures.trends, + snapshot.sectionIdentifiers.contains(.discover) { + snapshot.deleteSections([.discover]) } self.dataSource.apply(snapshot) }