From d90909f1cd7a13f39f7ad6946c26f13d0dd76351 Mon Sep 17 00:00:00 2001 From: Maxime Ollivier Date: Wed, 24 Jul 2024 14:11:59 -0700 Subject: [PATCH] clean up IGListExperimentDisableAnimationOnUpdates Summary: QE is done, so lets clean it up Reviewed By: DimaVartanian Differential Revision: D60184706 fbshipit-source-id: 3ece0452386fe1a3daad1f8958a65700431db36c --- Source/IGListDiffKit/IGListExperiments.h | 2 -- Source/IGListKit/IGListAdapter.m | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/IGListDiffKit/IGListExperiments.h b/Source/IGListDiffKit/IGListExperiments.h index 4fa764e7d..e0413bd7a 100644 --- a/Source/IGListDiffKit/IGListExperiments.h +++ b/Source/IGListDiffKit/IGListExperiments.h @@ -22,8 +22,6 @@ typedef NS_OPTIONS (NSInteger, IGListExperiment) { IGListExperimentThrowOnInconsistencyException = 1 << 3, /// Test keeping a strong pointer to the collectionView.dataSource during a batch update to avoid a crash IGListExperimentKeepPointerToCollectionViewDataSource = 1 << 4, - /// Test keeping disable all animation on updates - IGListExperimentDisableAnimationOnUpdates= 1 << 5 }; /** diff --git a/Source/IGListKit/IGListAdapter.m b/Source/IGListKit/IGListAdapter.m index 70686a98e..54ce8011e 100644 --- a/Source/IGListKit/IGListAdapter.m +++ b/Source/IGListKit/IGListAdapter.m @@ -417,7 +417,7 @@ - (void)performUpdatesAnimated:(BOOL)animated completion:(IGListUpdaterCompletio [strongSelf _updateWithData:data]; } }; - const BOOL shouldAnimateUpdates = animated && !IGListExperimentEnabled(self.experiments, IGListExperimentDisableAnimationOnUpdates); + IGListUpdaterCompletion outerCompletionBlock = ^(BOOL finished){ __typeof__(self) strongSelf = weakSelf; if (strongSelf == nil) { @@ -427,7 +427,7 @@ - (void)performUpdatesAnimated:(BOOL)animated completion:(IGListUpdaterCompletio // release the previous items strongSelf.previousSectionMap = nil; - [strongSelf _notifyDidUpdate:IGListAdapterUpdateTypePerformUpdates animated:shouldAnimateUpdates]; + [strongSelf _notifyDidUpdate:IGListAdapterUpdateTypePerformUpdates animated:animated]; IGLK_BLOCK_CALL_SAFE(completion,finished); [strongSelf _exitBatchUpdates]; };