Fix the displayDelegate bug from IGListSectionController

Summary:
We were using the iVar version of the `_displayDelegate`, but turned out a lot of product callsite just manually override the `displayDelegate` instead of use `self.displayDelegate = self`.

Let's use the self.displayDelegate instead.

Reviewed By: bdotdub

Differential Revision: D20037298

fbshipit-source-id: fa860adfa88cd088f39718279983acd32e90b478
This commit is contained in:
Zhisheng Huang 2020-02-21 11:49:37 -08:00 committed by Facebook Github Bot
parent 6dfdce1d5e
commit 191063e7cc

View file

@ -101,19 +101,19 @@ void IGListSectionControllerPopThread(void) {
}
- (void)willDisplayCell:(UICollectionViewCell *)cell atIndex:(NSInteger)index listAdapter:(IGListAdapter *)listAdapter {
[_displayDelegate listAdapter:listAdapter willDisplaySectionController:self cell:cell atIndex:index];
[self.displayDelegate listAdapter:listAdapter willDisplaySectionController:self cell:cell atIndex:index];
}
- (void)didEndDisplayingCell:(UICollectionViewCell *)cell atIndex:(NSInteger)index listAdapter:(IGListAdapter *)listAdapter {
[_displayDelegate listAdapter:listAdapter didEndDisplayingSectionController:self cell:cell atIndex:index];
[self.displayDelegate listAdapter:listAdapter didEndDisplayingSectionController:self cell:cell atIndex:index];
}
- (void)willDisplaySectionControllerWithListAdapter:(IGListAdapter *)listAdapter {
[_displayDelegate listAdapter:listAdapter willDisplaySectionController:self];
[self.displayDelegate listAdapter:listAdapter willDisplaySectionController:self];
}
- (void)didEndDisplayingSectionControllerWithListAdapter:(IGListAdapter *)listAdapter {
[_displayDelegate listAdapter:listAdapter didEndDisplayingSectionController:self];
[self.displayDelegate listAdapter:listAdapter didEndDisplayingSectionController:self];
}
@end