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
|
// this assumes that indexPathsForVisibleRows is always in order
|
||||||
lastLastVisibleRow = tableView.indexPathsForVisibleRows?.last
|
lastLastVisibleRow = tableView.indexPathsForVisibleRows?.last
|
||||||
|
|
||||||
let orderedContentSections = dataSource.snapshot().sectionIdentifiers.filter { timelineContentSections().contains($0) }
|
let orderedContentSections = dataSource.snapshot().sectionIdentifiers.enumerated().filter { timelineContentSections().contains($0.element) }
|
||||||
if indexPath.section == orderedContentSections.count - 1,
|
if let lastContentSection = orderedContentSections.last,
|
||||||
|
indexPath.section == lastContentSection.offset,
|
||||||
indexPath.row == tableView.numberOfRows(inSection: indexPath.section) - 1 {
|
indexPath.row == tableView.numberOfRows(inSection: indexPath.section) - 1 {
|
||||||
|
|
||||||
loadOlder()
|
loadOlder()
|
||||||
|
|
Loading…
Reference in New Issue