Merge pull request #663 from robintown/matryoshka-avatar
Fix avatars of remote participants in matryoshka mode
This commit is contained in:
commit
669b1403fc
2 changed files with 4 additions and 4 deletions
|
|
@ -72,12 +72,12 @@ export function Facepile({
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
{participants.slice(0, max).map((member, i) => {
|
{participants.slice(0, max).map((member, i) => {
|
||||||
const avatarUrl = member.user?.avatarUrl;
|
const avatarUrl = member.getMxcAvatarUrl();
|
||||||
return (
|
return (
|
||||||
<Avatar
|
<Avatar
|
||||||
key={member.userId}
|
key={member.userId}
|
||||||
size={size}
|
size={size}
|
||||||
src={avatarUrl}
|
src={avatarUrl ?? undefined}
|
||||||
fallback={member.name.slice(0, 1).toUpperCase()}
|
fallback={member.name.slice(0, 1).toUpperCase()}
|
||||||
className={styles.avatar}
|
className={styles.avatar}
|
||||||
style={{ left: i * (_size - _overlap) }}
|
style={{ left: i * (_size - _overlap) }}
|
||||||
|
|
|
||||||
|
|
@ -237,14 +237,14 @@ export function InCallView({
|
||||||
|
|
||||||
const renderAvatar = useCallback(
|
const renderAvatar = useCallback(
|
||||||
(roomMember: RoomMember, width: number, height: number) => {
|
(roomMember: RoomMember, width: number, height: number) => {
|
||||||
const avatarUrl = roomMember.user?.avatarUrl;
|
const avatarUrl = roomMember.getMxcAvatarUrl();
|
||||||
const size = Math.round(Math.min(width, height) / 2);
|
const size = Math.round(Math.min(width, height) / 2);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Avatar
|
<Avatar
|
||||||
key={roomMember.userId}
|
key={roomMember.userId}
|
||||||
size={size}
|
size={size}
|
||||||
src={avatarUrl}
|
src={avatarUrl ?? undefined}
|
||||||
fallback={roomMember.name.slice(0, 1).toUpperCase()}
|
fallback={roomMember.name.slice(0, 1).toUpperCase()}
|
||||||
className={styles.avatar}
|
className={styles.avatar}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue