Compare commits

..

No commits in common. "9c103103e8cb8641fd3deb94bf8c2158cc04bdec" and "2891f47cb34167e715d92b2c917a85bf03919c86" have entirely different histories.

2 changed files with 9 additions and 17 deletions

View File

@ -85,14 +85,14 @@ class TrendingStatusesViewController: UIViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
if !loaded { var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
loaded = true snapshot.appendSections([.statuses])
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>() snapshot.appendItems([.loadingIndicator])
snapshot.appendSections([.statuses]) dataSource.apply(snapshot, animatingDifferences: false)
snapshot.appendItems([.loadingIndicator])
dataSource.apply(snapshot, animatingDifferences: false)
Task { Task {
if !loaded {
loaded = true
await loadTrendingStatuses() await loadTrendingStatuses()
} }
} }

View File

@ -35,15 +35,7 @@ extension ToastableViewController {
} }
var toastParentView: UIView { view } var toastParentView: UIView { view }
var toastScrollView: UIScrollView? { var toastScrollView: UIScrollView? { view as? 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) { func showToast(configuration config: ToastConfiguration, animated: Bool) {
currentToast?.dismissToast(animated: false) currentToast?.dismissToast(animated: false)