1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

invert and outdent

This commit is contained in:
Michael Telatynski
2021-04-25 09:35:18 +01:00
parent 4411498057
commit 1c7d68bb16

View File

@@ -69,13 +69,11 @@ const AddExistingToSpaceDialog: React.FC<IProps> = ({ matrixClient: cli, space,
arr[0].push(room); arr[0].push(room);
} }
} else if (!existingRoomsSet.has(room)) { } else if (!existingRoomsSet.has(room)) {
if (DMRoomMap.shared().getUserIdForRoomId(room.roomId)) { if (!DMRoomMap.shared().getUserIdForRoomId(room.roomId)) {
// Only show DMs for non-public spaces as they make very little sense in spaces other than "Just Me" ones.
if (joinRule !== "public") {
arr[2].push(room);
}
} else {
arr[1].push(room); arr[1].push(room);
} else if (joinRule !== "public") {
// Only show DMs for non-public spaces as they make very little sense in spaces other than "Just Me" ones.
arr[2].push(room);
} }
} }
return arr; return arr;