mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 01:31:04 +00:00
Fix timeline next page
This commit is contained in:
parent
7a35779b29
commit
f610c3f047
1 changed files with 2 additions and 3 deletions
|
@ -308,15 +308,14 @@ extension TimelineViewModel: StatusesFetcher {
|
|||
pendingStatusesObserver.pendingStatuses.insert(contentsOf: newStatuses.map(\.id), at: 0)
|
||||
|
||||
let statuses = await datasource.getFiltered()
|
||||
let nextPageState: StatusesState.PagingState = statuses.count < 20 ? .none : .hasNextPage
|
||||
|
||||
if let topStatus = topStatus,
|
||||
visibleStatuses.contains(where: { $0.id == topStatus.id }),
|
||||
scrollToTopVisible
|
||||
{
|
||||
updateTimelineWithScrollToTop(newStatuses: newStatuses, statuses: statuses, nextPageState: nextPageState)
|
||||
updateTimelineWithScrollToTop(newStatuses: newStatuses, statuses: statuses, nextPageState: .hasNextPage)
|
||||
} else {
|
||||
updateTimelineWithAnimation(statuses: statuses, nextPageState: nextPageState)
|
||||
updateTimelineWithAnimation(statuses: statuses, nextPageState: .hasNextPage)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue