From fbba2f5dd771c5d623b2eb89f291683f2e309aaa Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 20 Jun 2017 12:31:55 -0400 Subject: [PATCH] colocate CollectionViewDelegate methods // FREEBIE --- .../ConversationView/MessagesViewController.m | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m index bb8915ba14..3210063196 100644 --- a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m +++ b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m @@ -1531,6 +1531,24 @@ typedef enum : NSUInteger { return YES; } +- (BOOL)collectionView:(UICollectionView *)collectionView + canPerformAction:(SEL)action + forItemAtIndexPath:(NSIndexPath *)indexPath + withSender:(id)sender +{ + id messageData = [self messageAtIndexPath:indexPath]; + return [messageData canPerformEditingAction:action]; +} + +- (void)collectionView:(UICollectionView *)collectionView + performAction:(SEL)action + forItemAtIndexPath:(NSIndexPath *)indexPath + withSender:(id)sender +{ + id messageData = [self messageAtIndexPath:indexPath]; + [messageData performEditingAction:action]; +} + - (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath @@ -3694,24 +3712,6 @@ typedef enum : NSUInteger { }]; } -- (BOOL)collectionView:(UICollectionView *)collectionView - canPerformAction:(SEL)action - forItemAtIndexPath:(NSIndexPath *)indexPath - withSender:(id)sender -{ - id messageData = [self messageAtIndexPath:indexPath]; - return [messageData canPerformEditingAction:action]; -} - -- (void)collectionView:(UICollectionView *)collectionView - performAction:(SEL)action - forItemAtIndexPath:(NSIndexPath *)indexPath - withSender:(id)sender -{ - id messageData = [self messageAtIndexPath:indexPath]; - [messageData performEditingAction:action]; -} - - (void)updateGroupModelTo:(TSGroupModel *)newGroupModel successCompletion:(void (^_Nullable)())successCompletion { __block TSGroupThread *groupThread;