Fix trending statuses not being deselected on navigation back

This commit is contained in:
Shadowfacts 2023-02-04 13:48:24 -05:00
parent ec75906bc1
commit ab3bad0e16
1 changed files with 5 additions and 3 deletions

View File

@ -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<Section, Item>!
@ -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<Section, Item>()