From 242c40af14de20d917b940845ec044ffb8cb6092 Mon Sep 17 00:00:00 2001 From: Timo K Date: Tue, 14 Apr 2026 18:32:39 +0200 Subject: [PATCH] move appBar hook to InCallView --- src/components/CallFooter.tsx | 5 ----- src/room/InCallView.tsx | 14 +++++++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/CallFooter.tsx b/src/components/CallFooter.tsx index 0b8abf9b..60d210dc 100644 --- a/src/components/CallFooter.tsx +++ b/src/components/CallFooter.tsx @@ -27,7 +27,6 @@ import { type CallViewModel, type GridMode, } from "../state/CallViewModel/CallViewModel"; -import { useAppBarSecondaryButton } from "../AppBar"; export interface AudioOutputSwitcher { targetOutput: string; @@ -185,10 +184,6 @@ export const CallFooter: FC = ({ if (audioOutputButton) buttons.push(audioOutputButton); - useAppBarSecondaryButton( - , - ); - if (hangup) buttons.push( = ({ matrixRoom.roomId, ); + const settingsButtonInAppBar = + headerStyle === HeaderStyle.AppBar && showHeader; + useAppBarSecondaryButton( + , + ); + // Only hide the settings button if we have an AppBar header and we are showing the header - const hideSettings = headerStyle === HeaderStyle.AppBar && showHeader; const footer = ( = ({ reactionIdentifier={`${client.getUserId()}:${client.getDeviceId()}`} reactionData={supportsReactions ? vm : undefined} audioOutputSwitcher={audioOutputSwitcher ?? undefined} - openSettings={hideSettings ? undefined : openSettings} + // Only pass the openSettings function if the settings button is not in the app bar. + // If there is no fn the button will be hidden in the footer. + openSettings={settingsButtonInAppBar ? undefined : openSettings} hangup={vm.hangup} //Debug props debugTileLayout={debugTileLayout}