Remove roomAvatarUrl from MatrixInfo

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2023-06-29 08:03:30 +02:00
parent 87bd9cf026
commit 8cafe0f25d
No known key found for this signature in database
GPG key ID: BB126BDA1FFBF42B
5 changed files with 3 additions and 14 deletions

View file

@ -114,10 +114,9 @@ export function HeaderLogo({ className }: HeaderLogoProps) {
interface RoomHeaderInfo {
roomName: string;
avatarUrl: string | null;
}
export function RoomHeaderInfo({ roomName, avatarUrl }: RoomHeaderInfo) {
export function RoomHeaderInfo({ roomName }: RoomHeaderInfo) {
return (
<>
<Subtitle data-testid="roomHeader_roomName" fontWeight="semiBold">

View file

@ -35,7 +35,6 @@ import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
import { useProfile } from "../profile/useProfile";
import { UserChoices } from "../livekit/useLiveKit";
import { findDeviceByName } from "../media-utils";
import { useRoomAvatar } from "./useRoomAvatar";
declare global {
interface Window {
@ -82,14 +81,12 @@ export function GroupCallView({
}, [groupCall]);
const { displayName, avatarUrl } = useProfile(client);
const roomAvatarUrl = useRoomAvatar(groupCall.room);
const matrixInfo: MatrixInfo = {
displayName,
avatarUrl,
roomName: groupCall.room.name,
roomIdOrAlias,
roomAvatarUrl,
};
useEffect(() => {

View file

@ -389,10 +389,7 @@ export function InCallView({
{!hideHeader && maximisedParticipant === null && (
<Header>
<LeftNav>
<RoomHeaderInfo
roomName={matrixInfo.roomName}
avatarUrl={matrixInfo.roomAvatarUrl}
/>
<RoomHeaderInfo roomName={matrixInfo.roomName} />
<VersionMismatchWarning
users={unencryptedEventsFromUsers}
room={groupCall.room}

View file

@ -55,10 +55,7 @@ export function LobbyView(props: Props) {
{!props.hideHeader && (
<Header>
<LeftNav>
<RoomHeaderInfo
roomName={props.matrixInfo.roomName}
avatarUrl={props.matrixInfo.roomAvatarUrl}
/>
<RoomHeaderInfo roomName={props.matrixInfo.roomName} />
</LeftNav>
<RightNav>
<UserMenuContainer />

View file

@ -35,7 +35,6 @@ export type MatrixInfo = {
avatarUrl: string;
roomName: string;
roomIdOrAlias: string;
roomAvatarUrl: string | null;
};
interface Props {