[FIX] Threads' pagination not working (#3631)

This commit is contained in:
Reinaldo Neto 2022-01-19 17:54:12 -03:00 committed by GitHub
parent 44d2b4b0e1
commit e91bb90543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ class ThreadMessagesView extends React.Component<IThreadMessagesViewProps, IThre
if (update && update.length) {
update = update.map(m => buildMessage(m));
// filter threads
threadsToCreate = update.filter(i1 => allThreadsRecords.find((i2: { id: string }) => i1._id === i2.id));
threadsToCreate = update.filter(i1 => !allThreadsRecords.find((i2: { id: string }) => i1._id === i2.id));
threadsToUpdate = allThreadsRecords.filter((i1: { id: string }) => update.find(i2 => i1.id === i2._id));
threadsToCreate = threadsToCreate.map(thread =>
threadsCollection.prepareCreate(