mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Ensure layout controller exposes only cell item index paths to range controller
This commit is contained in:
@@ -137,7 +137,9 @@ typedef struct ASRangeGeometry ASRangeGeometry;
|
||||
NSMutableSet *indexPathSet = [[NSMutableSet alloc] init];
|
||||
NSArray *layoutAttributes = [_collectionViewLayout layoutAttributesForElementsInRect:rangeBounds];
|
||||
for (UICollectionViewLayoutAttributes *la in layoutAttributes) {
|
||||
[indexPathSet addObject:la.indexPath];
|
||||
if (la.representedElementCategory == UICollectionElementCategoryCell) {
|
||||
[indexPathSet addObject:la.indexPath];
|
||||
}
|
||||
}
|
||||
return indexPathSet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user