Fix crash when pressing tabs

This commit is contained in:
Andy Uhnak
2022-03-17 12:37:42 +00:00
parent 5eb9445f83
commit 9ade55e100
5 changed files with 25 additions and 8 deletions
+6 -2
View File
@@ -600,9 +600,13 @@
{
[self.collectionViewPaginationThrottler throttle:^{
NSInteger collectionViewSection = indexPath.section;
if (collectionView.numberOfSections <= collectionViewSection)
{
return;
}
NSInteger numberOfItemsInSection = [collectionView numberOfItemsInSection:collectionViewSection];
if (collectionView.numberOfSections > collectionViewSection
&& indexPath.item == numberOfItemsInSection - 1)
if (indexPath.item == numberOfItemsInSection - 1)
{
NSInteger tableViewSection = collectionView.tag;
[self->recentsDataSource paginateInSection:tableViewSection];