Add additional debug logging for thread timeline mixup (#8693)
This commit is contained in:
parent
948f81d25f
commit
249d52c6f3
1 changed files with 10 additions and 2 deletions
|
@ -408,7 +408,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||||
// matrix-js-sdk.
|
// matrix-js-sdk.
|
||||||
let serializedEventIdsFromTimelineSets: { [key: string]: string[] }[];
|
let serializedEventIdsFromTimelineSets: { [key: string]: string[] }[];
|
||||||
let serializedEventIdsFromThreadsTimelineSets: { [key: string]: string[] }[];
|
let serializedEventIdsFromThreadsTimelineSets: { [key: string]: string[] }[];
|
||||||
const serializedThreadsMap: { [key: string]: string[] } = {};
|
const serializedThreadsMap: { [key: string]: any } = {};
|
||||||
if (room) {
|
if (room) {
|
||||||
const timelineSets = room.getTimelineSets();
|
const timelineSets = room.getTimelineSets();
|
||||||
const threadsTimelineSets = room.threadsTimelineSets;
|
const threadsTimelineSets = room.threadsTimelineSets;
|
||||||
|
@ -419,7 +419,15 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
// Serialize all threads in the room from theadId -> event IDs in the thread
|
// Serialize all threads in the room from theadId -> event IDs in the thread
|
||||||
room.getThreads().forEach((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,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue