Compare commits
2 Commits
2891f47cb3
...
9c103103e8
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 9c103103e8 | |
Shadowfacts | 382d8ef2c8 |
|
@ -85,14 +85,14 @@ class TrendingStatusesViewController: UIViewController {
|
|||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
|
||||
snapshot.appendSections([.statuses])
|
||||
snapshot.appendItems([.loadingIndicator])
|
||||
dataSource.apply(snapshot, animatingDifferences: false)
|
||||
|
||||
Task {
|
||||
if !loaded {
|
||||
loaded = true
|
||||
if !loaded {
|
||||
loaded = true
|
||||
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
|
||||
snapshot.appendSections([.statuses])
|
||||
snapshot.appendItems([.loadingIndicator])
|
||||
dataSource.apply(snapshot, animatingDifferences: false)
|
||||
|
||||
Task {
|
||||
await loadTrendingStatuses()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,15 @@ extension ToastableViewController {
|
|||
}
|
||||
|
||||
var toastParentView: UIView { view }
|
||||
var toastScrollView: UIScrollView? { view as? UIScrollView }
|
||||
var toastScrollView: UIScrollView? {
|
||||
if let scrollView = view as? UIScrollView {
|
||||
return scrollView
|
||||
} else if let collectionVC = self as? CollectionViewController {
|
||||
return collectionVC.collectionView
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func showToast(configuration config: ToastConfiguration, animated: Bool) {
|
||||
currentToast?.dismissToast(animated: false)
|
||||
|
|
Loading…
Reference in New Issue