Load more statuses from hashtag-timeline right away (IOS-272)
This commit is contained in:
parent
008691bdf8
commit
6b99c9def3
|
@ -96,16 +96,6 @@ extension HashtagTimelineViewController {
|
|||
}
|
||||
.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
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { [weak self] tag in
|
||||
|
@ -257,3 +247,13 @@ extension HashtagTimelineViewController: StatusTableViewControllerNavigateable {
|
|||
statusKeyCommandHandler(sender)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UIScrollViewDelegate
|
||||
|
||||
extension HashtagTimelineViewController: UIScrollViewDelegate {
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
ListBatchFetchViewModel.scrollViewdidScrollToEnd(scrollView) {
|
||||
viewModel.stateMachine.enter(HashtagTimelineViewModel.State.Loading.self)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue