mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Show space members when not invited even if summary didn't fail (#7153)
This commit is contained in:
parent
c2ab593816
commit
52e391a92a
@ -128,6 +128,7 @@ const useMyRoomMembership = (room: Room) => {
|
||||
};
|
||||
|
||||
const SpaceInfo = ({ space }: { space: Room }) => {
|
||||
// summary will begin as undefined whilst loading and go null if it fails to load.
|
||||
const summary = useAsyncMemo(async () => {
|
||||
if (space.getMyMembership() !== "invite") return;
|
||||
try {
|
||||
@ -156,7 +157,7 @@ const SpaceInfo = ({ space }: { space: Room }) => {
|
||||
memberSection = <span className="mx_SpaceRoomView_info_memberCount">
|
||||
{ _t("%(count)s members", { count: summary.num_joined_members }) }
|
||||
</span>;
|
||||
} else if (summary === null) {
|
||||
} else if (summary !== undefined) { // summary is not still loading
|
||||
memberSection = <RoomMemberCount room={space}>
|
||||
{ (count) => count > 0 ? (
|
||||
<AccessibleButton
|
||||
|
Loading…
Reference in New Issue
Block a user