From f8119be97bf71a54f2bb39244e60c9d7ec509704 Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Wed, 25 Apr 2018 11:15:12 -0400 Subject: [PATCH] Include videos in media gallery --- .../conversation/media-gallery/propTypes/Message.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ts/components/conversation/media-gallery/propTypes/Message.tsx b/ts/components/conversation/media-gallery/propTypes/Message.tsx index a72e4a44dac..73431ec59af 100644 --- a/ts/components/conversation/media-gallery/propTypes/Message.tsx +++ b/ts/components/conversation/media-gallery/propTypes/Message.tsx @@ -29,14 +29,15 @@ export const loadWithObjectURL = (loadMessage: MapAsync) => async ( } // Messages with video are too expensive to load into memory, so we don’t: - const [, messagesWithoutVideo] = partition(messages, hasVideoAttachment); + const [messagesWithVideo, messagesWithoutVideo] = partition( + messages, + hasVideoAttachment + ); const loadedMessagesWithoutVideo: Array = await Promise.all( messagesWithoutVideo.map(loadMessage) ); const loadedMessages = sortBy( - // // Only show images for MVP: - // [...messagesWithVideo, ...loadedMessagesWithoutVideo], - loadedMessagesWithoutVideo, + [...messagesWithVideo, ...loadedMessagesWithoutVideo], message => -message.received_at );