|
|
|
@ -797,12 +797,14 @@ class MediaGallery: NSObject, MediaGalleryDataSource, MediaTileViewControllerDel
|
|
|
|
|
|
|
|
|
|
func buildGalleryItem(attachment: TSAttachment, transaction: YapDatabaseReadTransaction) -> MediaGalleryItem? {
|
|
|
|
|
guard let attachmentStream = attachment as? TSAttachmentStream else {
|
|
|
|
|
owsFailDebug("gallery doesn't yet support showing undownloaded attachments")
|
|
|
|
|
// Avoid crash on dev mode
|
|
|
|
|
// owsFailDebug("gallery doesn't yet support showing undownloaded attachments")
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
guard let message = attachmentStream.fetchAlbumMessage(with: transaction) else {
|
|
|
|
|
owsFailDebug("message was unexpectedly nil")
|
|
|
|
|
// Avoid crash on dev mode
|
|
|
|
|
// owsFailDebug("message was unexpectedly nil")
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|