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

IGListAdapter: Fix not returning early when collectionView/dataSource is nil and completion is nil #51

Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions Source/IGListAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ IGLK_SUBCLASSING_RESTRICTED
- (void)performUpdatesAnimated:(BOOL)animated completion:(nullable IGListUpdaterCompletion)completion;

/**
Perform an immediate reload of the data in the data source, discarding the old objectss.
Perform an immediate reload of the data in the data source, discarding the old objects.
Copy link
Contributor

Choose a reason for hiding this comment

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

😂 nice one


@param completion A block executed when the reload completes.
*/
- (void)reloadDataWithCompletion:(nullable IGListUpdaterCompletion)completion;

/**
Reload the infra for specific objectss only.
Reload the infra for specific objects only.

@param objects The objects to reload.
*/
Expand Down
2 changes: 1 addition & 1 deletion Source/IGListAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ - (void)reloadDataWithCompletion:(nullable IGListUpdaterCompletion)completion {
if (dataSource == nil || collectionView == nil) {
if (completion) {
completion(NO);
return;
}
return;
}

NSArray *newItems = [[dataSource objectsForListAdapter:self] copy];
Expand Down