diff --git a/Tusker/Screens/Explore/TrendingStatusesViewController.swift b/Tusker/Screens/Explore/TrendingStatusesViewController.swift index 86a572a1..e3a6201e 100644 --- a/Tusker/Screens/Explore/TrendingStatusesViewController.swift +++ b/Tusker/Screens/Explore/TrendingStatusesViewController.swift @@ -9,13 +9,13 @@ import UIKit import Pachyderm -class TrendingStatusesViewController: UIViewController { +class TrendingStatusesViewController: UIViewController, CollectionViewController { weak var mastodonController: MastodonController! let filterer: Filterer - private var collectionView: UICollectionView { - view as! UICollectionView + var collectionView: UICollectionView! { + view as? UICollectionView } private var dataSource: UICollectionViewDiffableDataSource! @@ -110,6 +110,8 @@ class TrendingStatusesViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + clearSelectionOnAppear(animated: animated) + if !loaded { loaded = true var snapshot = NSDiffableDataSourceSnapshot()