From cf1a7e01d04bd4968f4984e8fc0344aff44c52c2 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 5 Apr 2018 15:58:02 -0400 Subject: [PATCH] Apply message bubble view to message details view. --- .../MessageDetailViewController.swift | 60 +------------------ 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/Signal/src/ViewControllers/MessageDetailViewController.swift b/Signal/src/ViewControllers/MessageDetailViewController.swift index 3f1651c68..a59edcb3f 100644 --- a/Signal/src/ViewControllers/MessageDetailViewController.swift +++ b/Signal/src/ViewControllers/MessageDetailViewController.swift @@ -615,71 +615,13 @@ class MessageDetailViewController: OWSViewController, MediaDetailPresenter, Medi self.navigationController?.pushViewController(viewController, animated: true) break case .media: - // TODO: Show/play media. + // TODO: We could show MediaGalleryViewController? break case .quotedReply: break } } -// -// - (void)handleMediaTapGesture -// { -// OWSAssert(self.delegate); -// -// TSAttachmentStream *_Nullable attachmentStream = self.viewItem.attachmentStream; -// -// switch (self.cellType) { -// case OWSMessageCellType_Unknown: -// case OWSMessageCellType_TextMessage: -// case OWSMessageCellType_OversizeTextMessage: -// break; -// case OWSMessageCellType_StillImage: -// OWSAssert(self.messageBubbleView.lastBodyMediaView); -// OWSAssert(attachmentStream); -// -// [self.delegate didTapImageViewItem:self.viewItem -// attachmentStream:attachmentStream -// imageView:self.messageBubbleView.lastBodyMediaView]; -// break; -// case OWSMessageCellType_AnimatedImage: -// OWSAssert(self.messageBubbleView.lastBodyMediaView); -// OWSAssert(attachmentStream); -// -// [self.delegate didTapImageViewItem:self.viewItem -// attachmentStream:attachmentStream -// imageView:self.messageBubbleView.lastBodyMediaView]; -// break; -// case OWSMessageCellType_Audio: -// OWSAssert(attachmentStream); -// -// [self.delegate didTapAudioViewItem:self.viewItem attachmentStream:attachmentStream]; -// return; -// case OWSMessageCellType_Video: -// OWSAssert(self.messageBubbleView.lastBodyMediaView); -// OWSAssert(attachmentStream); -// -// [self.delegate didTapVideoViewItem:self.viewItem -// attachmentStream:attachmentStream -// imageView:self.messageBubbleView.lastBodyMediaView]; -// return; -// case OWSMessageCellType_GenericAttachment: -// OWSAssert(attachmentStream); -// -// [AttachmentSharing showShareUIForAttachment:attachmentStream]; -// break; -// case OWSMessageCellType_DownloadingAttachment: { -// TSAttachmentPointer *_Nullable attachmentPointer = self.viewItem.attachmentPointer; -// OWSAssert(attachmentPointer); -// -// if (attachmentPointer.state == TSAttachmentPointerStateFailed) { -// [self.delegate didTapFailedIncomingAttachment:self.viewItem attachmentPointer:attachmentPointer]; -// } -// break; -// } -// } -// } - // MediaGalleryDataSourceDelegate func mediaGalleryDataSource(_ mediaGalleryDataSource: MediaGalleryDataSource, willDelete items: [MediaGalleryItem], initiatedBy: MediaGalleryDataSourceDelegate) {