You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Merge pull request #6055 from matrix-org/t3chguy/fix/17332
Fix space room hierarchy not updating when removing a room
This commit is contained in:
@@ -471,8 +471,12 @@ export const SpaceHierarchy: React.FC<IHierarchyProps> = ({
|
|||||||
try {
|
try {
|
||||||
for (const [parentId, childId] of selectedRelations) {
|
for (const [parentId, childId] of selectedRelations) {
|
||||||
await cli.sendStateEvent(parentId, EventType.SpaceChild, {}, childId);
|
await cli.sendStateEvent(parentId, EventType.SpaceChild, {}, childId);
|
||||||
parentChildMap.get(parentId).get(childId).content = {};
|
parentChildMap.get(parentId).delete(childId);
|
||||||
|
if (parentChildMap.get(parentId).size > 0) {
|
||||||
parentChildMap.set(parentId, new Map(parentChildMap.get(parentId)));
|
parentChildMap.set(parentId, new Map(parentChildMap.get(parentId)));
|
||||||
|
} else {
|
||||||
|
parentChildMap.delete(parentId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setError(_t("Failed to remove some rooms. Try again later"));
|
setError(_t("Failed to remove some rooms. Try again later"));
|
||||||
|
|||||||
Reference in New Issue
Block a user