From 191063e7cc54cdf59df489135ec9a05370ceebc5 Mon Sep 17 00:00:00 2001 From: Zhisheng Huang Date: Fri, 21 Feb 2020 11:49:37 -0800 Subject: [PATCH] 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 --- Source/IGListKit/IGListSectionController.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/IGListKit/IGListSectionController.m b/Source/IGListKit/IGListSectionController.m index fdb9b7bd..24e698e7 100644 --- a/Source/IGListKit/IGListSectionController.m +++ b/Source/IGListKit/IGListSectionController.m @@ -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