Removed unnecessary nil check on transitionDelegate

Summary:
Issue fixed: #1071

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/1076

Differential Revision: D6871289

Pulled By: rnystrom

fbshipit-source-id: 7ccf5a286ab4ee63bf72273142857496ce62b6f4
This commit is contained in:
Igor Vasilenko 2018-02-01 06:41:38 -08:00 committed by Facebook Github Bot
parent 64676d5907
commit 316779fb74
2 changed files with 8 additions and 16 deletions

View file

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