forked from shadowfacts/Tusker
parent
af5109f86c
commit
6c5909c800
|
@ -266,6 +266,11 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie
|
||||||
collectionView.contentInset = .zero
|
collectionView.contentInset = .zero
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func reloadInitial() async {
|
||||||
|
state = .unloaded
|
||||||
|
await load()
|
||||||
|
}
|
||||||
|
|
||||||
private func tryLoadPinned() async {
|
private func tryLoadPinned() async {
|
||||||
do {
|
do {
|
||||||
try await loadPinned()
|
try await loadPinned()
|
||||||
|
@ -353,10 +358,15 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Task {
|
Task {
|
||||||
// TODO: coalesce these data source updates
|
if newer == nil {
|
||||||
// TODO: refresh profile
|
// no statuses were loaded initially, so reload the initial batch
|
||||||
await controller.loadNewer()
|
await reloadInitial()
|
||||||
await tryLoadPinned()
|
} else {
|
||||||
|
// TODO: coalesce these data source updates
|
||||||
|
// TODO: refresh profile
|
||||||
|
await controller.loadNewer()
|
||||||
|
await tryLoadPinned()
|
||||||
|
}
|
||||||
#if !targetEnvironment(macCatalyst)
|
#if !targetEnvironment(macCatalyst)
|
||||||
collectionView.refreshControl?.endRefreshing()
|
collectionView.refreshControl?.endRefreshing()
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue