Fix crash when trying to prune rows before statuses have loaded
This commit is contained in:
parent
7d66117fab
commit
8cf217d2ba
|
@ -175,6 +175,9 @@ class TimelineViewController: UIViewController, TimelineLikeCollectionViewContro
|
|||
return
|
||||
}
|
||||
var snapshot = dataSource.snapshot()
|
||||
guard snapshot.indexOfSection(.statuses) != nil else {
|
||||
return
|
||||
}
|
||||
let items = snapshot.itemIdentifiers(inSection: .statuses)
|
||||
let pageSize = 20
|
||||
let numberOfPagesToPrune = (items.count - lastVisibleIndexPath.row - 1) / pageSize
|
||||
|
|
Loading…
Reference in New Issue