Fix issues in media gallery cells.

This commit is contained in:
Matthew Chen 2018-11-06 15:35:48 -05:00
parent f45693ec34
commit 5aa6467d20
2 changed files with 2 additions and 2 deletions

View file

@ -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];

View file

@ -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) {