Fix trending statuses not being deselected on navigation back
This commit is contained in:
parent
ec75906bc1
commit
ab3bad0e16
|
@ -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>()
|
||||
|
|
Loading…
Reference in New Issue