Skip to content

Commit

Permalink
Changed nullable keyword to _Nullable and added a missing return
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Boursier authored and TimOliver committed Apr 27, 2023
1 parent 5d7936b commit 95fb46b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Source/IGListKit/IGListBindingSectionController.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ - (void)didUnhighlightItemAtIndex:(NSInteger)index {
}

#if !TARGET_OS_TV
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
return [self.selectionDelegate sectionController:self contextMenuConfigurationForItemAtIndex:index point:point viewModel:self.viewModels[index]];
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ didUnhighlightItemAtIndex:(NSInteger)index
@return An object that conforms to `UIContextMenuConfiguration`.
*/
- (nullable UIContextMenuConfiguration *)sectionController:(IGListBindingSectionController *)sectionController
contextMenuConfigurationForItemAtIndex:(NSInteger)index
point:(CGPoint)point
viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
- (UIContextMenuConfiguration * _Nullable)sectionController:(IGListBindingSectionController *)sectionController
contextMenuConfigurationForItemAtIndex:(NSInteger)index
point:(CGPoint)point
viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);

@end

Expand Down
2 changes: 1 addition & 1 deletion Source/IGListKit/IGListSectionController.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ NS_SWIFT_NAME(ListSectionController)
@note The default implementation does nothing. **Calling super is not required.**
*/
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);

/**
Identifies whether an object can be moved through interactive reordering.
Expand Down
2 changes: 1 addition & 1 deletion Source/IGListKit/IGListSectionController.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ - (void)didHighlightItemAtIndex:(NSInteger)index {}

- (void)didUnhighlightItemAtIndex:(NSInteger)index {}

- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
return nil;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/IGListKit/Internal/IGListAdapter+UICollectionView.m
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ - (UIContextMenuConfiguration *)collectionView:(UICollectionView *)collectionVie
// forward this method to the delegate b/c this implementation will steal the message from the proxy
id<UICollectionViewDelegate> collectionViewDelegate = self.collectionViewDelegate;
if ([collectionViewDelegate respondsToSelector:@selector(collectionView:contextMenuConfigurationForItemAtIndexPath:point:)]) {
[collectionViewDelegate collectionView:collectionView contextMenuConfigurationForItemAtIndexPath:indexPath point:point];
return [collectionViewDelegate collectionView:collectionView contextMenuConfigurationForItemAtIndexPath:indexPath point:point];
}

IGListSectionController * sectionController = [self sectionControllerForSection:indexPath.section];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Objects/IGListTestSection.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ - (void)didUnhighlightItemAtIndex:(NSInteger)index {
self.wasUnhighlighted = YES;
}

- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
self.requestedContextMenu = YES;
return nil;
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Objects/IGTestBindingWithoutDeselectionDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ - (void)sectionController:(nonnull IGListBindingSectionController *)sectionContr
}


- (nullable UIContextMenuConfiguration *)sectionController:(nonnull IGListBindingSectionController *)sectionController
- (UIContextMenuConfiguration * _Nullable)sectionController:(nonnull IGListBindingSectionController *)sectionController
contextMenuConfigurationForItemAtIndex:(NSInteger)index
point:(CGPoint)point
viewModel:(nonnull id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) {
Expand Down
2 changes: 1 addition & 1 deletion Tests/Objects/IGTestDiffingSectionController.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (void)sectionController:(IGListBindingSectionController *)sectionController di
self.unhighlightedViewModel = viewModel;
}

- (nullable UIContextMenuConfiguration *)sectionController:(IGListBindingSectionController *)sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) {
- (UIContextMenuConfiguration * _Nullable)sectionController:(IGListBindingSectionController *)sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) {
self.contextMenuViewModel = viewModel;
return nil;
}
Expand Down

0 comments on commit 95fb46b

Please sign in to comment.