forked from shadowfacts/Tusker
Fix loadOlder being called excessively on public timelines
This commit is contained in:
parent
b781b56efd
commit
cf1000a4df
|
@ -156,8 +156,9 @@ class DiffableTimelineLikeTableViewController<Section: Hashable & CaseIterable,
|
|||
// this assumes that indexPathsForVisibleRows is always in order
|
||||
lastLastVisibleRow = tableView.indexPathsForVisibleRows?.last
|
||||
|
||||
let orderedContentSections = dataSource.snapshot().sectionIdentifiers.filter { timelineContentSections().contains($0) }
|
||||
if indexPath.section == orderedContentSections.count - 1,
|
||||
let orderedContentSections = dataSource.snapshot().sectionIdentifiers.enumerated().filter { timelineContentSections().contains($0.element) }
|
||||
if let lastContentSection = orderedContentSections.last,
|
||||
indexPath.section == lastContentSection.offset,
|
||||
indexPath.row == tableView.numberOfRows(inSection: indexPath.section) - 1 {
|
||||
|
||||
loadOlder()
|
||||
|
|
Loading…
Reference in New Issue