mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 11:20:18 +00:00
completely remove cell constrainedSize adjustment from section inset
This commit is contained in:
parent
818c5bab9c
commit
aa180c6f3b
@ -785,18 +785,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
||||
sectionInset = [(id<ASCollectionViewDelegateFlowLayout>)_asyncDelegate collectionView:self layout:self.collectionViewLayout insetForSectionAtIndex:indexPath.section];
|
||||
}
|
||||
|
||||
if (_asyncDataSourceImplementsConstrainedSizeForNode == NO){
|
||||
constrainedSize.min.height = MAX(0, constrainedSize.min.height - sectionInset.top - sectionInset.bottom);
|
||||
constrainedSize.min.width = MAX(0, constrainedSize.min.width - sectionInset.left - sectionInset.right);
|
||||
//ignore insets for FLT_MAX so FLT_MAX can be compared against
|
||||
if (constrainedSize.max.width - FLT_EPSILON < FLT_MAX) {
|
||||
constrainedSize.max.width = MAX(0, constrainedSize.max.width - sectionInset.left - sectionInset.right);
|
||||
}
|
||||
if (constrainedSize.max.height - FLT_EPSILON < FLT_MAX) {
|
||||
constrainedSize.max.height = MAX(0, constrainedSize.max.height - sectionInset.top - sectionInset.bottom);
|
||||
}
|
||||
}
|
||||
|
||||
return constrainedSize;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user