Include videos in media gallery
This commit is contained in:
parent
37d73accde
commit
f8119be97b
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue