diff --git a/src/components/middle/MessageListBotInfo.tsx b/src/components/middle/MessageListBotInfo.tsx index 6d4060b87..fbb6d7e7f 100644 --- a/src/components/middle/MessageListBotInfo.tsx +++ b/src/components/middle/MessageListBotInfo.tsx @@ -17,7 +17,6 @@ import renderText from '../common/helpers/renderText'; import useMedia from '../../hooks/useMedia'; import useOldLang from '../../hooks/useOldLang'; -import useDevicePixelRatio from '../../hooks/window/useDevicePixelRatio'; import OptimizedVideo from '../ui/OptimizedVideo'; import Skeleton from '../ui/placeholder/Skeleton'; @@ -40,19 +39,14 @@ const MessageListBotInfo: FC = ({ isInMessageList, }) => { const lang = useOldLang(); - const dpr = useDevicePixelRatio(); const botInfoPhotoUrl = useMedia(botInfo?.photo ? getBotCoverMediaHash(botInfo.photo) : undefined); const botInfoGifUrl = useMedia(botInfo?.gif ? getVideoMediaHash(botInfo.gif, 'full') : undefined); const botInfoDimensions = botInfo?.photo ? getPhotoFullDimensions(botInfo.photo) : botInfo?.gif ? getVideoDimensions(botInfo.gif) : undefined; - const botInfoRealDimensions = botInfoDimensions && { - width: botInfoDimensions.width / dpr, - height: botInfoDimensions.height / dpr, - }; const isBotInfoEmpty = botInfo && !botInfo.description && !botInfo.gif && !botInfo.photo; - const { width, height } = botInfoRealDimensions || {}; + const { width, height } = botInfoDimensions || {}; const isEmptyOrLoading = isBotInfoEmpty || isLoadingBotInfo; @@ -65,16 +59,16 @@ const MessageListBotInfo: FC = ({ {botInfo && (
{botInfoPhotoUrl && ( Bot info )} @@ -93,8 +87,8 @@ const MessageListBotInfo: FC = ({ {botInfoDimensions && !botInfoPhotoUrl && !botInfoGifUrl && ( )}