Skip to content

Commit

Permalink
Address PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Adlai Holler committed Dec 29, 2016
1 parent 12c5587 commit 2d60457
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/IGListAdapterUpdater.m
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ - (void)performBatchUpdatesWithCollectionView:(UICollectionView *)collectionView
// if the collection view isn't in a visible window, skip diffing and batch updating. execute all transition blocks,
// reload data, execute completion blocks, and get outta here
BOOL iOS83OrLater = (NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_8_3);
if (iOS83OrLater && _skipsDiffingWhenOffscreen && collectionView.window == nil) {
if (iOS83OrLater && self.skipsDiffingWhenOffscreen && collectionView.window == nil) {
[self beginPerformBatchUpdatestoObjects:toObjects];
executeUpdateBlocks();
[self cleanupUpdateBlockState];
Expand Down
6 changes: 2 additions & 4 deletions Tests/IGListAdapterUpdaterTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,7 @@ - (void)test_whenCallingReloadData_withUICollectionViewFlowLayout_withEstimatedS
XCTAssertEqual([collectionView numberOfItemsInSection:1], 4);
}

- (void)test_whenCollectionViewNotInWindow_andDiffSkippingFlagSetNO_diffHappens
{
- (void)test_whenCollectionViewNotInWindow_andDiffSkippingFlagSetNO_diffHappens {
self.updater.skipsDiffingWhenOffscreen = NO;
[self.collectionView removeFromSuperview];

Expand All @@ -481,8 +480,7 @@ - (void)test_whenCollectionViewNotInWindow_andDiffSkippingFlagSetNO_diffHappens
[mockDelegate verify];
}

- (void)test_whenCollectionViewNotInWindow_andDiffSkippingFlagDefaultYES_diffDoesNotHappen
{
- (void)test_whenCollectionViewNotInWindow_andDiffSkippingFlagDefaultYES_diffDoesNotHappen {
[self.collectionView removeFromSuperview];

id mockDelegate = [OCMockObject niceMockForProtocol:@protocol(IGListAdapterUpdaterDelegate)];
Expand Down

0 comments on commit 2d60457

Please sign in to comment.