Message: Fix avatar size on mobile jumping to smaller on load (#2670)

This commit is contained in:
Alexander Zinchuk 2023-02-25 18:50:18 +01:00
parent f820292006
commit 4c350d53b4
4 changed files with 13 additions and 7 deletions

View File

@ -74,6 +74,17 @@
} }
} }
&.size-small-mobile {
width: 2.5rem;
height: 2.5rem;
font-size: 0.875rem;
.emoji {
width: 0.875rem;
height: 0.875rem;
}
}
&.size-medium { &.size-medium {
width: 2.75rem; width: 2.75rem;
height: 2.75rem; height: 2.75rem;

View File

@ -45,7 +45,7 @@ cn.icon = cn('icon');
type OwnProps = { type OwnProps = {
className?: string; className?: string;
size?: 'micro' | 'tiny' | 'mini' | 'small' | 'medium' | 'large' | 'jumbo'; size?: 'micro' | 'tiny' | 'mini' | 'small' | 'small-mobile' | 'medium' | 'large' | 'jumbo';
chat?: ApiChat; chat?: ApiChat;
user?: ApiUser; user?: ApiUser;
photo?: ApiPhoto; photo?: ApiPhoto;

View File

@ -64,11 +64,6 @@
left: 0; left: 0;
margin-right: 0.3125rem; margin-right: 0.3125rem;
@media (max-width: 600px) {
width: 2.5rem;
height: 2.5rem;
}
} }
.quick-reaction { .quick-reaction {

View File

@ -691,7 +691,7 @@ const Message: FC<OwnProps & StateProps> = ({
return ( return (
<Avatar <Avatar
size="small" size={isMobile ? 'small-mobile' : 'small'}
user={avatarUser} user={avatarUser}
chat={avatarChat} chat={avatarChat}
text={hiddenName} text={hiddenName}