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