From c471d4f7bdf21b5cd4722ee85ee06a6171fc107d Mon Sep 17 00:00:00 2001 From: Ryan Nystrom Date: Thu, 26 Jul 2018 09:11:14 -0700 Subject: [PATCH] Remove unused experimental feature Summary: Causes more crashes, removing since this isn't a useful feature. Reviewed By: maxoll Differential Revision: D8543859 fbshipit-source-id: 681aeaa23143e119405eefa2c2775180c51a5657 --- Source/Common/IGListExperiments.h | 2 -- Source/IGListAdapterUpdater.m | 5 ----- Tests/IGListAdapterE2ETests.m | 19 ------------------- 3 files changed, 26 deletions(-) diff --git a/Source/Common/IGListExperiments.h b/Source/Common/IGListExperiments.h index cb42c666..dc625100 100644 --- a/Source/Common/IGListExperiments.h +++ b/Source/Common/IGListExperiments.h @@ -20,8 +20,6 @@ typedef NS_OPTIONS (NSInteger, IGListExperiment) { IGListExperimentBackgroundDiffing = 1 << 2, /// Test fallback to reloadData when "too many" update operations. IGListExperimentReloadDataFallback = 1 << 3, - /// Test deduping item-level updates. - IGListExperimentDedupeItemUpdates = 1 << 5, /// Test deferring object creation until just before diffing. IGListExperimentDeferredToObjectCreation = 1 << 6, /// Test getting collection view at update time. diff --git a/Source/IGListAdapterUpdater.m b/Source/IGListAdapterUpdater.m index 90e8be4e..eac64593 100644 --- a/Source/IGListAdapterUpdater.m +++ b/Source/IGListAdapterUpdater.m @@ -334,11 +334,6 @@ void convertReloadToDeleteInsert(NSMutableIndexSet *reloads, [itemDeletes addObjectsFromArray:[reloadDeletePaths allObjects]]; [itemInserts addObjectsFromArray:[reloadInsertPaths allObjects]]; - if (IGListExperimentEnabled(self.experiments, IGListExperimentDedupeItemUpdates)) { - itemDeletes = [[[NSSet setWithArray:itemDeletes] allObjects] mutableCopy]; - itemInserts = [[[NSSet setWithArray:itemInserts] allObjects] mutableCopy]; - } - IGListBatchUpdateData *updateData = [[IGListBatchUpdateData alloc] initWithInsertSections:inserts deleteSections:deletes moveSections:moves diff --git a/Tests/IGListAdapterE2ETests.m b/Tests/IGListAdapterE2ETests.m index d16fadce..7c91d173 100644 --- a/Tests/IGListAdapterE2ETests.m +++ b/Tests/IGListAdapterE2ETests.m @@ -1785,25 +1785,6 @@ [self waitForExpectationsWithTimeout:30 handler:nil]; } -- (void)test_whenInsertingItemTwice_withDedupeExperiment_thatSecondInsertGetsDropped { - ((IGListAdapterUpdater*)self.updater).experiments = IGListExperimentDedupeItemUpdates; - - IGTestObject *object = genTestObject(@1, @1); - [self setupWithObjects:@[object]]; - - IGTestDelegateController *controller = [self.adapter sectionControllerForObject:self.dataSource.objects.firstObject]; - XCTestExpectation *expectation = genExpectation; - [controller.collectionContext performBatchAnimated:YES updates:^(id _Nonnull batchContext) { - object.value = @2; - [batchContext insertInSectionController:controller atIndexes:[NSIndexSet indexSetWithIndex:0]]; - [batchContext insertInSectionController:controller atIndexes:[NSIndexSet indexSetWithIndex:0]]; - } completion:^(BOOL finished) { - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:30 handler:nil]; -} - - (void)test_whenModifyingInitialAndFinalAttribute_thatLayoutIsCorrect { // set up the custom layout IGListCollectionViewLayout *layout = [[IGListCollectionViewLayout alloc] initWithStickyHeaders:NO topContentInset:0 stretchToEdge:YES];