From 7398a83ae4b4d8f656dea3952e0f72c0cfc3ea6e Mon Sep 17 00:00:00 2001 From: Will Hunt <2072976+Half-Shot@users.noreply.github.com> Date: Fri, 2 Jan 2026 17:51:15 +0000 Subject: [PATCH] Show correct call icon for joining a call. (#31489) * Show correct call icon in header. * fix import * Simply useRoomCall output * Add tests and a label * update snap * update test --- .../views/rooms/RoomHeader/RoomHeader.tsx | 22 ++++++++++++++----- src/hooks/room/useRoomCall.tsx | 16 +++++++++++--- src/i18n/strings/en_EN.json | 2 ++ .../rooms/RoomHeader/RoomHeader-test.tsx | 20 ++++++++++++++--- .../__snapshots__/RoomHeader-test.tsx.snap | 8 +++---- 5 files changed, 53 insertions(+), 15 deletions(-) diff --git a/src/components/views/rooms/RoomHeader/RoomHeader.tsx b/src/components/views/rooms/RoomHeader/RoomHeader.tsx index e2cc00abda..1cf48f6618 100644 --- a/src/components/views/rooms/RoomHeader/RoomHeader.tsx +++ b/src/components/views/rooms/RoomHeader/RoomHeader.tsx @@ -21,6 +21,7 @@ import PublicIcon from "@vector-im/compound-design-tokens/assets/web/icons/publi import { JoinRule, type Room } from "matrix-js-sdk/src/matrix"; import { type ViewRoomOpts } from "@matrix-org/react-sdk-module-api/lib/lifecycles/RoomViewLifecycle"; import { Flex, Box } from "@element-hq/web-shared-components"; +import { CallType } from "matrix-js-sdk/src/webrtc/call"; import { useRoomName } from "../../../../hooks/useRoomName.ts"; import { RightPanelPhases } from "../../../../stores/right-panel/RightPanelStorePhases.ts"; @@ -73,7 +74,7 @@ function RoomHeaderButtons({ toggleCallMaximized: toggleCall, isViewingCall, isConnectedToCall, - hasActiveCallSession, + activeCallSessionType, callOptions, showVoiceCallButton, showVideoCallButton, @@ -105,15 +106,26 @@ function RoomHeaderButtons({ ); const joinCallButton = ( - +