mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-08 07:28:26 +00:00
Stop tracking threads if threads support is disabled (#8308)
This commit is contained in:
committed by
GitHub
parent
a59f889f79
commit
d151365fd7
@@ -1395,6 +1395,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||||||
return b.length - a.length;
|
return b.length - a.length;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.context.supportsExperimentalThreads()) {
|
||||||
// Process all thread roots returned in this batch of search results
|
// Process all thread roots returned in this batch of search results
|
||||||
// XXX: This won't work for results coming from Seshat which won't include the bundled relationship
|
// XXX: This won't work for results coming from Seshat which won't include the bundled relationship
|
||||||
for (const result of results.results) {
|
for (const result of results.results) {
|
||||||
@@ -1406,6 +1407,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||||||
event.setThread(room.findThreadForEvent(event) ?? room.createThread(event, [], true));
|
event.setThread(room.findThreadForEvent(event) ?? room.createThread(event, [], true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
searchHighlights: highlights,
|
searchHighlights: highlights,
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ export async function fetchInitialEvent(
|
|||||||
initialEvent = null;
|
initialEvent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (initialEvent?.isThreadRelation) {
|
if (initialEvent?.isThreadRelation && client.supportsExperimentalThreads()) {
|
||||||
try {
|
try {
|
||||||
const rootEventData = await client.fetchRoomEvent(roomId, initialEvent.threadRootId);
|
const rootEventData = await client.fetchRoomEvent(roomId, initialEvent.threadRootId);
|
||||||
const rootEvent = new MatrixEvent(rootEventData);
|
const rootEvent = new MatrixEvent(rootEventData);
|
||||||
|
|||||||
Reference in New Issue
Block a user