Must tap directly on bubble to launch fullscreen media view (#1260)

// FREEBIE
pull/1/head
Michael Kirk 9 years ago committed by GitHub
parent bd1e99026f
commit e7d4763715

@ -1032,8 +1032,19 @@ typedef enum : NSUInteger {
- (void)collectionView:(JSQMessagesCollectionView *)collectionView didTapCellAtIndexPath:(NSIndexPath *)indexPath touchLocation:(CGPoint)touchLocation - (void)collectionView:(JSQMessagesCollectionView *)collectionView didTapCellAtIndexPath:(NSIndexPath *)indexPath touchLocation:(CGPoint)touchLocation
{ {
// Pass info/error message tapping to bubble tapping handler TSMessageAdapter *messageItem = [collectionView.dataSource collectionView:collectionView messageDataForItemAtIndexPath:indexPath];
[self collectionView:collectionView didTapMessageBubbleAtIndexPath: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 - (void)collectionView:(JSQMessagesCollectionView *)collectionView
@ -1220,12 +1231,6 @@ typedef enum : NSUInteger {
} }
} }
} break; } break;
case TSErrorMessageAdapter:
[self handleErrorMessageTap:(TSErrorMessage *)interaction];
break;
case TSInfoMessageAdapter:
[self handleWarningTap:interaction];
break;
case TSCallAdapter: case TSCallAdapter:
break; break;
default: default:

Loading…
Cancel
Save