Fix issues in media gallery cells.

pull/1/head
Matthew Chen 7 years ago
parent f45693ec34
commit 5aa6467d20

@ -809,7 +809,7 @@ const UIDataDetectorTypes kOWSAllowedDataDetectorTypes
- (UIView *)loadViewForMedia
{
OWSAssertDebug(self.attachmentStream);
OWSAssertDebug([self.attachmentStream isImage]);
OWSAssertDebug([self.attachmentStream isVisualMedia]);
ConversationMediaView *mediaView =
[[ConversationMediaView alloc] initWithMediaCache:self.cellMediaCache attachment:self.attachmentStream];

@ -217,7 +217,7 @@ static const NSUInteger OWSMessageSchemaVersion = 4;
- (BOOL)isMediaGalleryWithTransaction:(YapDatabaseReadTransaction *)transaction
{
NSArray<TSAttachment *> *attachments = [self attachmentsWithTransaction:transaction];
if (attachments.count < 1) {
if (attachments.count < 2) {
return NO;
}
for (TSAttachment *attachment in attachments) {

Loading…
Cancel
Save