mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 17:28:22 +00:00
Rename "withCollectionView:" param to "collectionView:"
Summary: - Rename "withCollectionView:" param to "collectionView:" param to be consistent with the rest of the protocol. - Update tests. Related issue: #466 - [x] All tests pass. Demo project builds and runs. - [ ] I added tests, an experiment, or detailed why my change isn't tested. - [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. - [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) Closes https://github.com/Instagram/IGListKit/pull/491 Differential Revision: D4589976 Pulled By: rnystrom fbshipit-source-id: 5e5aa7328a6bbac6baa705d5228f0eb4321d8c31
This commit is contained in:
parent
8cf2bbe640
commit
2adea72158
4 changed files with 10 additions and 5 deletions
|
|
@ -26,6 +26,9 @@ This release closes the [3.0.0 milestone](https://github.com/Instagram/IGListKit
|
|||
|
||||
- Replaced `IGListGridCollectionViewLayout` with `IGListCollectionViewLayout`. [[Ryan Nystrom](https://github.com/rnystrom) [(tbd)](https://github.com/Instagram/IGListKit/pull/tbd)
|
||||
|
||||
- Renamed `IGListAdapterUpdaterDelegate` method to `listAdapterUpdater:didPerformBatchUpdates:collectionView:`. [Vincent Peng](https://github.com/vincent-peng) [(#491)](https://github.com/Instagram/IGListKit/pull/491)
|
||||
|
||||
|
||||
### Enhancements
|
||||
|
||||
- You can now manually move items (cells) within a section controller, ex: `[self.collectionContext moveInSectionController:self fromIndex:0 toIndex:1]`. [Ryan Nystrom](https://github.com/rnystrom) [(#418)](https://github.com/Instagram/IGListKit/pull/418)
|
||||
|
|
@ -209,3 +212,5 @@ You can find a [migration guide here](https://instagram.github.io/IGListKit/migr
|
|||
-----
|
||||
|
||||
Initial release. :tada:
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ static NSArray *objectsWithDuplicateIdentifiersRemoved(NSArray<id<IGListDiffable
|
|||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
*/
|
||||
- (void)listAdapterUpdater:(IGListAdapterUpdater *)listAdapterUpdater
|
||||
didPerformBatchUpdates:(IGListBatchUpdateData *)updates
|
||||
withCollectionView:(UICollectionView *)collectionView;
|
||||
collectionView:(UICollectionView *)collectionView;
|
||||
|
||||
/**
|
||||
Notifies the delegate that the updater will call `-[UICollectionView insertItemsAtIndexPaths:]`.
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@
|
|||
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];
|
||||
}
|
||||
|
|
@ -467,7 +467,7 @@
|
|||
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 = @[
|
||||
|
|
@ -492,7 +492,7 @@
|
|||
// 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 = @[
|
||||
|
|
|
|||
Loading…
Reference in a new issue