mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Filter empty threads out from list (#8008)
This commit is contained in:
parent
93bde40568
commit
3d6dece344
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user