mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
// FREEBIE
This commit is contained in:
parent
29769b4b76
commit
583d3e82ad
|
@ -1041,23 +1041,6 @@ typedef enum : NSUInteger {
|
|||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (void)collectionView:(JSQMessagesCollectionView *)collectionView didTapCellAtIndexPath:(NSIndexPath *)indexPath touchLocation:(CGPoint)touchLocation
|
||||
{
|
||||
TSMessageAdapter *messageItem = [collectionView.dataSource collectionView:collectionView messageDataForItemAtIndexPath:indexPath];
|
||||
TSInteraction *interaction = [self interactionAtIndexPath:indexPath];
|
||||
|
||||
switch (messageItem.messageType) {
|
||||
case TSErrorMessageAdapter:
|
||||
[self handleErrorMessageTap:(TSErrorMessage *)interaction];
|
||||
break;
|
||||
case TSInfoMessageAdapter:
|
||||
[self handleWarningTap:interaction];
|
||||
break;
|
||||
default:
|
||||
DDLogDebug(@"Not handling cell tap for message: %@", messageItem);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)collectionView:(JSQMessagesCollectionView *)collectionView
|
||||
didTapMessageBubbleAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
@ -1242,6 +1225,12 @@ typedef enum : NSUInteger {
|
|||
}
|
||||
}
|
||||
} break;
|
||||
case TSErrorMessageAdapter:
|
||||
[self handleErrorMessageTap:(TSErrorMessage *)interaction];
|
||||
break;
|
||||
case TSInfoMessageAdapter:
|
||||
[self handleWarningTap:interaction];
|
||||
break;
|
||||
case TSCallAdapter:
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -56,4 +56,13 @@
|
|||
self.cellLabel.text = nil;
|
||||
}
|
||||
|
||||
// This subclass does not have a messageBubbleContainerView, so superclass
|
||||
// touch calculations will be incorrect. Since this view spans the entire
|
||||
// frame, we can override the touch handler to respond to user actions by
|
||||
// default.
|
||||
- (void)jsq_handleTapGesture:(UITapGestureRecognizer *)tap
|
||||
{
|
||||
[self.delegate messagesCollectionViewCellDidTapMessageBubble:self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue