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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;