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}