mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-01 01:46:55 +01:00
Load more statuses from hashtag-timeline right away (IOS-272)
This commit is contained in:
parent
008691bdf8
commit
6b99c9def3
@ -95,17 +95,7 @@ extension HashtagTimelineViewController {
|
|||||||
self.refreshControl.endRefreshing()
|
self.refreshControl.endRefreshing()
|
||||||
}
|
}
|
||||||
.store(in: &disposeBag)
|
.store(in: &disposeBag)
|
||||||
|
|
||||||
// setup batch fetch
|
|
||||||
viewModel.listBatchFetchViewModel.setup(scrollView: tableView)
|
|
||||||
viewModel.listBatchFetchViewModel.shouldFetch
|
|
||||||
.receive(on: DispatchQueue.main)
|
|
||||||
.sink { [weak self] _ in
|
|
||||||
guard let self = self else { return }
|
|
||||||
self.viewModel.stateMachine.enter(HashtagTimelineViewModel.State.Loading.self)
|
|
||||||
}
|
|
||||||
.store(in: &disposeBag)
|
|
||||||
|
|
||||||
viewModel.hashtagEntity
|
viewModel.hashtagEntity
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
.sink { [weak self] tag in
|
.sink { [weak self] tag in
|
||||||
@ -257,3 +247,13 @@ extension HashtagTimelineViewController: StatusTableViewControllerNavigateable {
|
|||||||
statusKeyCommandHandler(sender)
|
statusKeyCommandHandler(sender)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - UIScrollViewDelegate
|
||||||
|
|
||||||
|
extension HashtagTimelineViewController: UIScrollViewDelegate {
|
||||||
|
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||||
|
ListBatchFetchViewModel.scrollViewdidScrollToEnd(scrollView) {
|
||||||
|
viewModel.stateMachine.enter(HashtagTimelineViewModel.State.Loading.self)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user