Merge pull request #3024 from yougotwill/fix/ses-1438/no_admin_icon_right_panel

SES-1438: fix: dont show admin crown in message info screen
pull/3028/head
Audric Ackermann 1 year ago committed by GitHub
commit 851a8b26b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -38,10 +38,10 @@ export type MessageAvatarSelectorProps = Pick<
'sender' | 'isSenderAdmin' | 'lastMessageOfSeries' 'sender' | 'isSenderAdmin' | 'lastMessageOfSeries'
>; >;
type Props = { messageId: string; hideAvatar: boolean; isPrivate: boolean }; type Props = { messageId: string; hideAvatar: boolean; isPrivate: boolean; isDetailView?: boolean };
export const MessageAvatar = (props: Props) => { export const MessageAvatar = (props: Props) => {
const { messageId, hideAvatar, isPrivate } = props; const { messageId, hideAvatar, isPrivate, isDetailView } = props;
const dispatch = useDispatch(); const dispatch = useDispatch();
const selectedConvoKey = useSelectedConversationKey(); const selectedConvoKey = useSelectedConversationKey();
@ -143,7 +143,7 @@ export const MessageAvatar = (props: Props) => {
}} }}
> >
<Avatar size={AvatarSize.S} onAvatarClick={onMessageAvatarClick} pubkey={sender} /> <Avatar size={AvatarSize.S} onAvatarClick={onMessageAvatarClick} pubkey={sender} />
{isSenderAdmin && <CrownIcon />} {!isDetailView && isSenderAdmin ? <CrownIcon /> : null}
</StyledAvatar> </StyledAvatar>
); );
}; };

@ -176,6 +176,7 @@ export const MessageContent = (props: Props) => {
messageId={props.messageId} messageId={props.messageId}
hideAvatar={hideAvatar} hideAvatar={hideAvatar}
isPrivate={selectedIsPrivate} isPrivate={selectedIsPrivate}
isDetailView={props.isDetailView}
/> />
</StyledAvatarContainer> </StyledAvatarContainer>

Loading…
Cancel
Save