[FIX] Threads' pagination not working (#3631)
This commit is contained in:
parent
44d2b4b0e1
commit
e91bb90543
|
@ -284,7 +284,7 @@ class ThreadMessagesView extends React.Component<IThreadMessagesViewProps, IThre
|
||||||
if (update && update.length) {
|
if (update && update.length) {
|
||||||
update = update.map(m => buildMessage(m));
|
update = update.map(m => buildMessage(m));
|
||||||
// filter threads
|
// 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));
|
threadsToUpdate = allThreadsRecords.filter((i1: { id: string }) => update.find(i2 => i1.id === i2._id));
|
||||||
threadsToCreate = threadsToCreate.map(thread =>
|
threadsToCreate = threadsToCreate.map(thread =>
|
||||||
threadsCollection.prepareCreate(
|
threadsCollection.prepareCreate(
|
||||||
|
|
Loading…
Reference in New Issue