Improve conversation initial load times
This commit is contained in:
parent
d85a43fe93
commit
1622fdfa4e
1 changed files with 2 additions and 2 deletions
|
@ -1147,7 +1147,7 @@ Whisper.ConversationView = Whisper.View.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
const messages = await getOlderMessagesByConversation(conversationId, {
|
const messages = await getOlderMessagesByConversation(conversationId, {
|
||||||
limit: 500,
|
limit: 50,
|
||||||
MessageCollection: Whisper.MessageCollection,
|
MessageCollection: Whisper.MessageCollection,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1157,7 +1157,7 @@ Whisper.ConversationView = Whisper.View.extend({
|
||||||
setFocus && metrics.newest ? metrics.newest.id : undefined;
|
setFocus && metrics.newest ? metrics.newest.id : undefined;
|
||||||
|
|
||||||
// Because our `getOlderMessages` fetch above didn't specify a receivedAt, we got
|
// Because our `getOlderMessages` fetch above didn't specify a receivedAt, we got
|
||||||
// the most recent 500 messages in the conversation. If it has a conflict with
|
// the most recent 50 messages in the conversation. If it has a conflict with
|
||||||
// metrics, fetched a bit before, that's likely a race condition. So we tell our
|
// metrics, fetched a bit before, that's likely a race condition. So we tell our
|
||||||
// reducer to trust the message set we just fetched for determining if we have
|
// reducer to trust the message set we just fetched for determining if we have
|
||||||
// the newest message loaded.
|
// the newest message loaded.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue