Revert D6871289: [IGListKit][PR] Removed unnecessary nil check on transitionDelegate

Summary:
This reverts commit 7ccf5a286ab4ee63bf72273142857496ce62b6f4

bypass-lint

An infra SEV is better than not reverting this diff.
If you copy this password, see you in SEV Review!
cause_a_sev_many_files

Differential Revision:
D6871289

Original commit changeset: 7ccf5a286ab4

fbshipit-source-id: e75cc7bd4a378e1092f4a01be3104fddb336759a
This commit is contained in:
Michelle Deng 2018-02-02 07:04:25 -08:00 committed by Facebook Github Bot
parent 1d87526bab
commit 29a82d744d
2 changed files with 16 additions and 8 deletions

View file

@ -25,6 +25,8 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag
- Reordered position of intercepted selector in `IGListAdapterProxy`'s `isInterceptedSelector` method to reduce overall consumption of compare. [zhongwuzw](https://github.com/zhongwu) [(#1055)](https://github.com/Instagram/IGListKit/pull/1055)
- Made IGListTransitionDelegate inherited from NSObject. [Igor Vasilenko](https://github.com/vasilenkoigor) [(#1075)](https://github.com/Instagram/IGListKit/pull/1075)
### Fixes
- Duplicate objects for initial data source setup filtered out. [Mikhail Vashlyaev](https://github.com/yemodin) [(#993](https://github.com/Instagram/IGListKit/pull/993)

View file

@ -218,10 +218,13 @@
customizedInitialLayoutAttributes:(UICollectionViewLayoutAttributes *)attributes
atIndexPath:(NSIndexPath *)indexPath {
IGListSectionController *sectionController = [self sectionControllerForSection:indexPath.section];
return [sectionController.transitionDelegate listAdapter:self
customizedInitialLayoutAttributes:attributes
sectionController:sectionController
atIndex:indexPath.item];
if (sectionController.transitionDelegate) {
return [sectionController.transitionDelegate listAdapter:self
customizedInitialLayoutAttributes:attributes
sectionController:sectionController
atIndex:indexPath.item];
}
return attributes;
}
- (UICollectionViewLayoutAttributes *)collectionView:(UICollectionView *)collectionView
@ -229,10 +232,13 @@
customizedFinalLayoutAttributes:(UICollectionViewLayoutAttributes *)attributes
atIndexPath:(NSIndexPath *)indexPath {
IGListSectionController *sectionController = [self sectionControllerForSection:indexPath.section];
return [sectionController.transitionDelegate listAdapter:self
customizedFinalLayoutAttributes:attributes
sectionController:sectionController
atIndex:indexPath.item];
if (sectionController.transitionDelegate) {
return [sectionController.transitionDelegate listAdapter:self
customizedFinalLayoutAttributes:attributes
sectionController:sectionController
atIndex:indexPath.item];
}
return attributes;
}
@end