|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
//
|
|
|
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
|
|
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#import "OWSMessageBubbleView.h"
|
|
|
|
@ -1376,10 +1376,6 @@ const UIDataDetectorTypes kOWSAllowedDataDetectorTypes
|
|
|
|
|
OWSAssertDebug(self.bodyMediaView);
|
|
|
|
|
OWSAssertDebug(self.viewItem.mediaAlbumItems.count > 0);
|
|
|
|
|
|
|
|
|
|
if (self.viewItem.mediaAlbumHasFailedAttachment) {
|
|
|
|
|
[self.delegate didTapFailedIncomingAttachment:self.viewItem];
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (![self.bodyMediaView isKindOfClass:[OWSMediaAlbumCellView class]]) {
|
|
|
|
|
OWSFailDebug(@"Unexpected body media view: %@", self.bodyMediaView.class);
|
|
|
|
|
return;
|
|
|
|
@ -1394,6 +1390,14 @@ const UIDataDetectorTypes kOWSAllowedDataDetectorTypes
|
|
|
|
|
|
|
|
|
|
TSAttachment *attachment = mediaView.attachment;
|
|
|
|
|
if (![attachment isKindOfClass:[TSAttachmentStream class]]) {
|
|
|
|
|
if ([attachment isKindOfClass:[TSAttachmentPointer class]]) {
|
|
|
|
|
TSAttachmentPointer *attachmentPointer = (TSAttachmentPointer *)attachment;
|
|
|
|
|
if (attachmentPointer.state == TSAttachmentPointerStateFailed) {
|
|
|
|
|
[self.delegate didTapFailedIncomingAttachment:self.viewItem];
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OWSLogWarn(@"Media attachment not yet downloaded.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|