Compare commits
2 Commits
afcec24f86
...
b0a6952643
Author | SHA1 | Date |
---|---|---|
Shadowfacts | b0a6952643 | |
Shadowfacts | 06b58cfb9c |
|
@ -11,11 +11,11 @@ import Pachyderm
|
|||
import WebURLFoundationExtras
|
||||
import Combine
|
||||
|
||||
class TrendingHashtagsViewController: UIViewController {
|
||||
class TrendingHashtagsViewController: UIViewController, CollectionViewController {
|
||||
|
||||
private let mastodonController: MastodonController
|
||||
|
||||
private var collectionView: UICollectionView!
|
||||
private(set) var collectionView: UICollectionView!
|
||||
private var dataSource: UICollectionViewDiffableDataSource<Section, Item>!
|
||||
|
||||
private var state = State.unloaded
|
||||
|
@ -84,6 +84,8 @@ class TrendingHashtagsViewController: UIViewController {
|
|||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
clearSelectionOnAppear(animated: animated)
|
||||
|
||||
Task {
|
||||
await loadInitial()
|
||||
}
|
||||
|
|
|
@ -752,3 +752,16 @@ extension NotificationsCollectionViewController: StatusCollectionViewCellDelegat
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension NotificationsCollectionViewController: TabBarScrollableViewController {
|
||||
func tabBarScrollToTop() {
|
||||
collectionView.scrollToTop()
|
||||
}
|
||||
}
|
||||
|
||||
extension NotificationsCollectionViewController: StatusBarTappableViewController {
|
||||
func handleStatusBarTapped(xPosition: CGFloat) -> StatusBarTapActionResult {
|
||||
collectionView.scrollToTop()
|
||||
return .stop
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue