Fix manage rooms not showing avatar for dms
Signed-off-by: ajbura <ajbura@gmail.com>
This commit is contained in:
parent
f1394239a3
commit
70f0f91a17
1 changed files with 7 additions and 2 deletions
|
@ -83,6 +83,7 @@ function SpaceManageItem({
|
||||||
imageSrc = room.getAvatarFallbackMember()?.getAvatarUrl(mx.baseUrl, 24, 24, 'crop') || null;
|
imageSrc = room.getAvatarFallbackMember()?.getAvatarUrl(mx.baseUrl, 24, 24, 'crop') || null;
|
||||||
if (imageSrc === null) imageSrc = room.getAvatarUrl(mx.baseUrl, 24, 24, 'crop') || null;
|
if (imageSrc === null) imageSrc = room.getAvatarUrl(mx.baseUrl, 24, 24, 'crop') || null;
|
||||||
}
|
}
|
||||||
|
const isDM = directs.has(roomId);
|
||||||
|
|
||||||
const handleOpen = () => {
|
const handleOpen = () => {
|
||||||
if (isSpace) selectTab(roomId);
|
if (isSpace) selectTab(roomId);
|
||||||
|
@ -100,9 +101,13 @@ function SpaceManageItem({
|
||||||
<Avatar
|
<Avatar
|
||||||
text={name}
|
text={name}
|
||||||
bgColor={colorMXID(roomId)}
|
bgColor={colorMXID(roomId)}
|
||||||
imageSrc={directs.has(roomId) ? imageSrc : null}
|
imageSrc={isDM ? imageSrc : null}
|
||||||
iconColor="var(--ic-surface-low)"
|
iconColor="var(--ic-surface-low)"
|
||||||
iconSrc={joinRuleToIconSrc((roomInfo.join_rules || roomInfo.join_rule), isSpace)}
|
iconSrc={
|
||||||
|
isDM
|
||||||
|
? null
|
||||||
|
: joinRuleToIconSrc((roomInfo.join_rules || roomInfo.join_rule), isSpace)
|
||||||
|
}
|
||||||
size="extra-small"
|
size="extra-small"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue