You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-10 05:42:29 +03:00
Filter empty threads out from list (#8008)
This commit is contained in:
@@ -91,8 +91,8 @@ export async function getThreadTimelineSet(
|
||||
});
|
||||
|
||||
Array.from(room.threads)
|
||||
.sort(([, threadA], [, threadB]) => threadA.replyToEvent.getTs() - threadB.replyToEvent.getTs())
|
||||
.forEach(([, thread]) => {
|
||||
if (thread.length === 0) return;
|
||||
const currentUserParticipated = thread.events.some(event => event.getSender() === client.getUserId());
|
||||
if (filterType !== ThreadFilterType.My || currentUserParticipated) {
|
||||
timelineSet.getLiveTimeline().addEvent(thread.rootEvent, false);
|
||||
|
||||
Reference in New Issue
Block a user