1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-05 15:22:09 +03:00

Support dynamic room predecessors in SpaceHierarchy (#10341)

This commit is contained in:
Andy Balaam
2023-03-10 09:41:14 +00:00
committed by GitHub
parent b646250c90
commit 42abfb1fac
2 changed files with 36 additions and 1 deletions

View File

@@ -67,6 +67,7 @@ import { Alignment } from "../views/elements/Tooltip";
import { getTopic } from "../../hooks/room/useTopic";
import { SdkContextClass } from "../../contexts/SDKContext";
import { getDisplayAliasForAliasSet } from "../../Rooms";
import SettingsStore from "../../settings/SettingsStore";
interface IProps {
space: Room;
@@ -425,7 +426,11 @@ interface IHierarchyLevelProps {
}
export const toLocalRoom = (cli: MatrixClient, room: IHierarchyRoom, hierarchy: RoomHierarchy): IHierarchyRoom => {
const history = cli.getRoomUpgradeHistory(room.room_id, true);
const history = cli.getRoomUpgradeHistory(
room.room_id,
true,
SettingsStore.getValue("feature_dynamic_room_predecessors"),
);
// Pick latest room that is actually part of the hierarchy
let cliRoom = null;