Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1d9906c

Browse files
authored
Fix room join spinner in room list header (#7364)
1 parent cc689f9 commit 1d9906c

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/components/views/rooms/RoomListHeader.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
import React, { useContext, useEffect, useState } from "react";
17+
import React, { ComponentProps, useContext, useEffect, useState } from "react";
1818
import { Room } from "matrix-js-sdk/src/models/room";
1919
import { EventType } from "matrix-js-sdk/src/@types/event";
2020

@@ -41,7 +41,6 @@ import ErrorDialog from "../dialogs/ErrorDialog";
4141
import { showCommunityInviteDialog } from "../../../RoomInvite";
4242
import { useDispatcher } from "../../../hooks/useDispatcher";
4343
import InlineSpinner from "../elements/InlineSpinner";
44-
import TooltipButton from "../elements/TooltipButton";
4544
import MatrixClientContext from "../../../contexts/MatrixClientContext";
4645
import RoomListStore, { LISTS_UPDATE_EVENT } from "../../../stores/room-list/RoomListStore";
4746
import {
@@ -51,6 +50,7 @@ import {
5150
UPDATE_HOME_BEHAVIOUR,
5251
UPDATE_SELECTED_SPACE,
5352
} from "../../../stores/spaces";
53+
import TooltipTarget from "../elements/TooltipTarget";
5454

5555
const contextMenuBelow = (elementRect: DOMRect) => {
5656
// align the context menu's icons with the icon which opened the context menu
@@ -60,7 +60,7 @@ const contextMenuBelow = (elementRect: DOMRect) => {
6060
return { left, top, chevronFace };
6161
};
6262

63-
const PrototypeCommunityContextMenu = (props) => {
63+
const PrototypeCommunityContextMenu = (props: ComponentProps<typeof SpaceContextMenu>) => {
6464
const communityId = CommunityPrototypeStore.instance.getSelectedCommunityId();
6565

6666
let settingsOption;
@@ -327,14 +327,13 @@ const RoomListHeader = ({ spacePanelDisabled, onVisibilityChange }: IProps) => {
327327
title = getMetaSpaceName(spaceKey as MetaSpace, allRoomsInHome);
328328
}
329329

330-
let pendingRoomJoinSpinner;
330+
let pendingRoomJoinSpinner: JSX.Element;
331331
if (joiningRooms.size) {
332-
pendingRoomJoinSpinner = <InlineSpinner>
333-
<TooltipButton helpText={_t(
334-
"Currently joining %(count)s rooms",
335-
{ count: joiningRooms.size },
336-
)} />
337-
</InlineSpinner>;
332+
pendingRoomJoinSpinner = <TooltipTarget
333+
label={_t("Currently joining %(count)s rooms", { count: joiningRooms.size })}
334+
>
335+
<InlineSpinner />
336+
</TooltipTarget>;
338337
}
339338

340339
let contextMenuButton: JSX.Element = <div className="mx_RoomListHeader_contextLessTitle">{ title }</div>;

0 commit comments

Comments
 (0)