A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(app): stop fetching a tiny avatar for the large voice tile (#1975)
Hampus66791d3ca2b7
diff --git a/fluxer_app/src/features/voice/components/VoiceParticipantTile.tsx b/fluxer_app/src/features/voice/components/VoiceParticipantTile.tsxindex d1d29f2eb..bf0638c6d 100644--- a/fluxer_app/src/features/voice/components/VoiceParticipantTile.tsx+++ b/fluxer_app/src/features/voice/components/VoiceParticipantTile.tsx@@ -85,6 +85,7 @@ import {STREAM_ENDED_DESCRIPTOR,STREAM_HIDDEN_DESCRIPTOR,TILE_AVATAR_BASE,+ TILE_AVATAR_MEDIA_SIZE,TILE_AVATAR_STYLE,type VoiceParticipantTileInnerProps,type VoiceParticipantTileProps,@@ -872,6 +873,7 @@ const VoiceParticipantTileInner = observer(function VoiceParticipantTileInner({<Avataruser={participantUser}size={TILE_AVATAR_BASE}+ mediaSize={TILE_AVATAR_MEDIA_SIZE}className={styles.avatarFlexShrink}style={TILE_AVATAR_STYLE}guildId={guildId}diff --git a/fluxer_app/src/features/voice/components/voice_participant_tile/FocusedCameraPlaceholder.tsx b/fluxer_app/src/features/voice/components/voice_participant_tile/FocusedCameraPlaceholder.tsxindex ab561aa25..ab0673983 100644--- a/fluxer_app/src/features/voice/components/voice_participant_tile/FocusedCameraPlaceholder.tsx+++ b/fluxer_app/src/features/voice/components/voice_participant_tile/FocusedCameraPlaceholder.tsx@@ -4,7 +4,11 @@ import {Avatar} from '@app/features/ui/components/Avatar';import type {User} from '@app/features/user/models/User';import voiceCallStyles from '@app/features/voice/components/VoiceCallView.module.css';import styles from '@app/features/voice/components/VoiceParticipantTile.module.css';-import {TILE_AVATAR_BASE, TILE_AVATAR_STYLE} from '@app/features/voice/components/voice_participant_tile/shared';+import {+ TILE_AVATAR_BASE,+ TILE_AVATAR_MEDIA_SIZE,+ TILE_AVATAR_STYLE,+} from '@app/features/voice/components/voice_participant_tile/shared';import {VideoCameraIcon} from '@phosphor-icons/react';import {clsx} from 'clsx';import type React from 'react';@@ -31,6 +35,7 @@ export function FocusedCameraPlaceholder({guildId, participantUser, style}: Focu<Avataruser={participantUser}size={TILE_AVATAR_BASE}+ mediaSize={TILE_AVATAR_MEDIA_SIZE}className={styles.avatarFlexShrink}style={TILE_AVATAR_STYLE}guildId={guildId}diff --git a/fluxer_app/src/features/voice/components/voice_participant_tile/ScreenSharePlaceholder.tsx b/fluxer_app/src/features/voice/components/voice_participant_tile/ScreenSharePlaceholder.tsxindex 329e8a99f..549772511 100644--- a/fluxer_app/src/features/voice/components/voice_participant_tile/ScreenSharePlaceholder.tsx+++ b/fluxer_app/src/features/voice/components/voice_participant_tile/ScreenSharePlaceholder.tsx@@ -4,7 +4,11 @@ import {Avatar} from '@app/features/ui/components/Avatar';import {LiveBadge} from '@app/features/ui/components/LiveBadge';import type {User} from '@app/features/user/models/User';import styles from '@app/features/voice/components/VoiceParticipantTile.module.css';-import {TILE_AVATAR_BASE, TILE_AVATAR_STYLE} from '@app/features/voice/components/voice_participant_tile/shared';+import {+ TILE_AVATAR_BASE,+ TILE_AVATAR_MEDIA_SIZE,+ TILE_AVATAR_STYLE,+} from '@app/features/voice/components/voice_participant_tile/shared';import {MonitorPlayIcon} from '@phosphor-icons/react';import {clsx} from 'clsx';import type React from 'react';@@ -32,6 +36,7 @@ export function ScreenSharePlaceholder({guildId, participantUser, showLiveBadge,<Avataruser={participantUser}size={TILE_AVATAR_BASE}+ mediaSize={TILE_AVATAR_MEDIA_SIZE}className={styles.avatarFlexShrink}style={TILE_AVATAR_STYLE}guildId={guildId}diff --git a/fluxer_app/src/features/voice/components/voice_participant_tile/shared.ts b/fluxer_app/src/features/voice/components/voice_participant_tile/shared.tsindex e1c1b8b4d..a6244e833 100644--- a/fluxer_app/src/features/voice/components/voice_participant_tile/shared.ts+++ b/fluxer_app/src/features/voice/components/voice_participant_tile/shared.ts@@ -2,12 +2,15 @@import {Logger} from '@app/features/platform/utils/AppLogger';import {VoiceTrackSource} from '@app/features/voice/engine/VoiceTrackSource';+import {MEDIA_PROXY_AVATAR_SIZE_PROFILE} from '@fluxer/constants/src/MediaProxyAssetSizes';+import type {MediaProxyImageSize} from '@fluxer/constants/src/MediaProxyImageSizes';import {msg} from '@lingui/core/macro';import type {TrackReferenceOrPlaceholder} from '@livekit/components-react';import type React from 'react';export const logger = new Logger('VoiceParticipantTile');export const TILE_AVATAR_BASE = 192;+export const TILE_AVATAR_MEDIA_SIZE: MediaProxyImageSize = MEDIA_PROXY_AVATAR_SIZE_PROFILE;export const TILE_AVATAR_STYLE = {width: 'var(--tile-avatar-size)',height: 'var(--tile-avatar-size)',