Skip to content

Commit

Permalink
Feature/beginners warning
Browse files Browse the repository at this point in the history
Summary:
Issue fixed: Instagram#811

I don't think this change needs a item in `CHANGELOG.md` as it's not a real bug fix or enhancement that influences the behaviour of the library.

- [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 Instagram#812

Differential Revision: D5283118

Pulled By: rnystrom

fbshipit-source-id: 518d38c7f620cef3e85cae5fd4a1c48567bcc48c
  • Loading branch information
weyert authored and facebook-github-bot committed Jun 20, 2017
1 parent 895de47 commit 68b7313
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/IGListAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ - (void)performUpdatesAnimated:(BOOL)animated completion:(IGListUpdaterCompletio
id<IGListAdapterDataSource> dataSource = self.dataSource;
UICollectionView *collectionView = self.collectionView;
if (dataSource == nil || collectionView == nil) {
IGLKLog(@"Warning: Your call to performUpdatesAnimated-method is ignored as dataSource or collectionView haven't been set.");
if (completion) {
completion(NO);
}
Expand Down Expand Up @@ -308,6 +309,7 @@ - (void)reloadDataWithCompletion:(nullable IGListUpdaterCompletion)completion {
id<IGListAdapterDataSource> dataSource = self.dataSource;
UICollectionView *collectionView = self.collectionView;
if (dataSource == nil || collectionView == nil) {
IGLKLog(@"Warning: Your call to reloadDataWithCompletion-method is ignored as dataSource or collectionView haven't been set.");
if (completion) {
completion(NO);
}
Expand Down

0 comments on commit 68b7313

Please sign in to comment.