From 4e87c56fb99ddfaf1514178fa05afa7b39c48c9b Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Wed, 5 Jul 2023 13:16:08 +0200 Subject: [PATCH] Avatar: Fix icon sizes & missing letters (#3485) --- src/components/common/Avatar.scss | 10 +--------- src/components/common/Avatar.tsx | 5 +++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/common/Avatar.scss b/src/components/common/Avatar.scss index 1d2260d20..4eb6ed3fe 100644 --- a/src/components/common/Avatar.scss +++ b/src/components/common/Avatar.scss @@ -27,7 +27,7 @@ } &__icon { - font-size: 1.25rem; + font-size: 1.25em; } &.size-micro { @@ -99,10 +99,6 @@ &.size-large { font-size: 1.3125rem; - .icon { - font-size: 1.625rem; - } - .emoji { width: 1.3125rem; height: 1.3125rem; @@ -114,10 +110,6 @@ height: 7.5rem; font-size: 3.5rem; - &__i { - font-size: 6rem; - } - .emoji { width: 3.5rem; height: 3.5rem; diff --git a/src/components/common/Avatar.tsx b/src/components/common/Avatar.tsx index 2f10b6990..6bc9ae051 100644 --- a/src/components/common/Avatar.tsx +++ b/src/components/common/Avatar.tsx @@ -71,8 +71,9 @@ const Avatar: FC = ({ // eslint-disable-next-line no-null/no-null const ref = useRef(null); const videoLoopCountRef = useRef(0); - const user = peer && isUserId(peer.id) ? peer as ApiUser : undefined; - const chat = peer && !isUserId(peer.id) ? peer as ApiChat : undefined; + const isPeerChat = peer && 'title' in peer; + const user = peer && !isPeerChat ? peer as ApiUser : undefined; + const chat = peer && isPeerChat ? peer as ApiChat : undefined; const isDeleted = user && isDeletedUser(user); const isReplies = peer && isChatWithRepliesBot(peer.id); const isForum = chat?.isForum;