Load 50 attachments for media gallery

This commit is contained in:
Daniel Gasienica 2018-04-14 21:08:16 -04:00
parent 0a4be2e0f4
commit 809e34b0f4

View file

@ -29,14 +29,12 @@ export const fetchVisualMediaAttachments = async ({
await deferredToPromise(
collection.fetch({
index: {
// 'hasVisualMediaAttachments' index on
// [conversationId, hasVisualMediaAttachments, received_at]
name: 'hasVisualMediaAttachments',
lower: [conversationId, hasVisualMediaAttachments, lowerReceivedAt],
upper: [conversationId, hasVisualMediaAttachments, upperReceivedAt],
order: 'desc',
},
limit: 10,
limit: 50,
})
);