Skip to content

Commit

Permalink
Include videos in media gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
gasi-signal committed Apr 27, 2018
1 parent 37d73ac commit f8119be
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ export const loadWithObjectURL = (loadMessage: MapAsync<Message>) => 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<Message> = await Promise.all(
messagesWithoutVideo.map(loadMessage)
);
const loadedMessages = sortBy(
// // Only show images for MVP:
// [...messagesWithVideo, ...loadedMessagesWithoutVideo],
loadedMessagesWithoutVideo,
[...messagesWithVideo, ...loadedMessagesWithoutVideo],
message => -message.received_at
);

Expand Down

0 comments on commit f8119be

Please sign in to comment.