Add globe icons in search
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
6388894aa4
commit
c304670f47
2 changed files with 16 additions and 8 deletions
|
|
@ -49,11 +49,11 @@ function Selector({
|
|||
};
|
||||
}, []);
|
||||
|
||||
const joinRuleToIconSrc = {
|
||||
const joinRuleToIconSrc = (joinRule) => ({
|
||||
restricted: () => (room.isSpaceRoom() ? SpaceIC : HashIC),
|
||||
invite: () => (room.isSpaceRoom() ? SpaceLockIC : HashLockIC),
|
||||
public: () => (room.isSpaceRoom() ? SpaceGlobeIC : HashGlobeIC),
|
||||
};
|
||||
}[joinRule]?.() || null);
|
||||
|
||||
if (room.isSpaceRoom()) {
|
||||
return (
|
||||
|
|
@ -61,7 +61,7 @@ function Selector({
|
|||
key={roomId}
|
||||
name={room.name}
|
||||
roomId={roomId}
|
||||
iconSrc={joinRuleToIconSrc[room.getJoinRule()]?.() || null}
|
||||
iconSrc={joinRuleToIconSrc(room.getJoinRule())}
|
||||
isUnread={noti.hasNoti(roomId)}
|
||||
notificationCount={abbreviateNumber(noti.getTotalNoti(roomId))}
|
||||
isAlert={noti.getHighlightNoti(roomId) !== 0}
|
||||
|
|
@ -90,7 +90,7 @@ function Selector({
|
|||
name={room.name}
|
||||
roomId={roomId}
|
||||
imageSrc={isDM ? imageSrc : null}
|
||||
iconSrc={isDM ? null : joinRuleToIconSrc[room.getJoinRule()]?.() || null}
|
||||
iconSrc={isDM ? null : joinRuleToIconSrc(room.getJoinRule())}
|
||||
isSelected={isSelected}
|
||||
isUnread={noti.hasNoti(roomId)}
|
||||
notificationCount={abbreviateNumber(noti.getTotalNoti(roomId))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue