Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename "withCollectionView:" param to "collectionView:" #491

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/IGListAdapterUpdater.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ - (void)performBatchUpdatesWithCollectionView:(UICollectionView *)collectionView

executeCompletionBlocks(finished);

[delegate listAdapterUpdater:self didPerformBatchUpdates:updateData withCollectionView:collectionView];
[delegate listAdapterUpdater:self didPerformBatchUpdates:updateData collectionView:collectionView];

// queue another update in case something changed during batch updates. this method will bail next runloop if
// there are no changes
Expand Down
2 changes: 1 addition & 1 deletion Source/IGListAdapterUpdaterDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)listAdapterUpdater:(IGListAdapterUpdater *)listAdapterUpdater
didPerformBatchUpdates:(IGListBatchUpdateData *)updates
withCollectionView:(UICollectionView *)collectionView;
collectionView:(UICollectionView *)collectionView;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: formatting


/**
Notifies the delegate that the updater will call `-[UICollectionView insertItemsAtIndexPaths:]`.
Expand Down
6 changes: 3 additions & 3 deletions Tests/IGListAdapterUpdaterTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ - (void)test_whenPerformingUpdates_withNilCollectionView_thatDelegateEventNotSen
self.updater.delegate = mockDelegate;
id compilerFriendlyNil = nil;
[[mockDelegate reject] listAdapterUpdater:self.updater willPerformBatchUpdatesWithCollectionView:compilerFriendlyNil];
[[mockDelegate reject] listAdapterUpdater:self.updater didPerformBatchUpdates:[OCMArg any] withCollectionView:compilerFriendlyNil];
[[mockDelegate reject] listAdapterUpdater:self.updater didPerformBatchUpdates:[OCMArg any] collectionView:compilerFriendlyNil];
[self.updater performBatchUpdatesWithCollectionView:compilerFriendlyNil];
[mockDelegate verify];
}
Expand Down Expand Up @@ -467,7 +467,7 @@ - (void)test_whenCollectionViewNotInWindow_andBackgroundReloadFlag_isSetNO_diffH
self.updater.delegate = mockDelegate;
[mockDelegate setExpectationOrderMatters:YES];
[[mockDelegate expect] listAdapterUpdater:self.updater willPerformBatchUpdatesWithCollectionView:self.collectionView];
[[mockDelegate expect] listAdapterUpdater:self.updater didPerformBatchUpdates:OCMOCK_ANY withCollectionView:self.collectionView];
[[mockDelegate expect] listAdapterUpdater:self.updater didPerformBatchUpdates:OCMOCK_ANY collectionView:self.collectionView];

XCTestExpectation *expectation = genExpectation;
NSArray *to = @[
Expand All @@ -492,7 +492,7 @@ - (void)test_whenCollectionViewNotInWindow_andBackgroundReloadFlag_isDefaultYES_
// except the batch updates calls.

[[mockDelegate reject] listAdapterUpdater:self.updater willPerformBatchUpdatesWithCollectionView:self.collectionView];
[[mockDelegate reject] listAdapterUpdater:self.updater didPerformBatchUpdates:OCMOCK_ANY withCollectionView:self.collectionView];
[[mockDelegate reject] listAdapterUpdater:self.updater didPerformBatchUpdates:OCMOCK_ANY collectionView:self.collectionView];

XCTestExpectation *expectation = genExpectation;
NSArray *to = @[
Expand Down