Skip to content

Commit

Permalink
clean up IGListExperimentDisableAnimationOnUpdates
Browse files Browse the repository at this point in the history
Summary: QE is done, so lets clean it up

Reviewed By: DimaVartanian

Differential Revision: D60184706

fbshipit-source-id: 3ece0452386fe1a3daad1f8958a65700431db36c
  • Loading branch information
Maxime Ollivier authored and facebook-github-bot committed Jul 24, 2024
1 parent ce74888 commit d90909f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Source/IGListDiffKit/IGListExperiments.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

/**
Expand Down
4 changes: 2 additions & 2 deletions Source/IGListKit/IGListAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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];
};
Expand Down

0 comments on commit d90909f

Please sign in to comment.