Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add additional debug logging for thread timeline mixup (#8693)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored May 25, 2022
1 parent 948f81d commit 249d52c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/structures/TimelinePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
// matrix-js-sdk.
let serializedEventIdsFromTimelineSets: { [key: string]: string[] }[];
let serializedEventIdsFromThreadsTimelineSets: { [key: string]: string[] }[];
const serializedThreadsMap: { [key: string]: string[] } = {};
const serializedThreadsMap: { [key: string]: any } = {};
if (room) {
const timelineSets = room.getTimelineSets();
const threadsTimelineSets = room.threadsTimelineSets;
Expand All @@ -419,7 +419,15 @@ class TimelinePanel extends React.Component<IProps, IState> {

// Serialize all threads in the room from theadId -> event IDs in the thread
room.getThreads().forEach((thread) => {
serializedThreadsMap[thread.id] = thread.events.map(ev => ev.getId());
serializedThreadsMap[thread.id] = {
events: thread.events.map(ev => ev.getId()),
numTimelines: thread.timelineSet.getTimelines().length,
liveTimeline: thread.timelineSet.getLiveTimeline().getEvents().length,
prevTimeline: thread.timelineSet.getLiveTimeline().getNeighbouringTimeline(Direction.Backward)
?.getEvents().length,
nextTimeline: thread.timelineSet.getLiveTimeline().getNeighbouringTimeline(Direction.Forward)
?.getEvents().length,
};
});
}

Expand Down

0 comments on commit 249d52c

Please sign in to comment.