From 6def917d1cf8eb904324d7f45917abe15334a914 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Fri, 3 May 2024 14:38:10 +0200 Subject: [PATCH] [Refactoring] Custom Emoji: Remove grid fix (#4528) --- src/components/common/CustomEmoji.module.scss | 5 ----- src/components/common/CustomEmoji.tsx | 3 --- src/components/common/helpers/renderTextWithEntities.tsx | 2 -- src/components/middle/message/_message-content.scss | 1 - 4 files changed, 11 deletions(-) diff --git a/src/components/common/CustomEmoji.module.scss b/src/components/common/CustomEmoji.module.scss index 021a61790..24416edc9 100644 --- a/src/components/common/CustomEmoji.module.scss +++ b/src/components/common/CustomEmoji.module.scss @@ -6,11 +6,6 @@ position: relative; flex: 0 0 var(--custom-emoji-size); - &.with-grid-fix .media, &.with-grid-fix .thumb { - width: calc(100%) !important; - height: calc(100% + 1px) !important; - } - canvas { display: block; } diff --git a/src/components/common/CustomEmoji.tsx b/src/components/common/CustomEmoji.tsx index 7da2d7c3c..fba5d293b 100644 --- a/src/components/common/CustomEmoji.tsx +++ b/src/components/common/CustomEmoji.tsx @@ -30,7 +30,6 @@ type OwnProps = { style?: string; isBig?: boolean; noPlay?: boolean; - withGridFix?: boolean; withSharedAnimation?: boolean; sharedCanvasRef?: React.RefObject; sharedCanvasHqRef?: React.RefObject; @@ -55,7 +54,6 @@ const CustomEmoji: FC = ({ className, loopLimit, style, - withGridFix, withSharedAnimation, sharedCanvasRef, sharedCanvasHqRef, @@ -117,7 +115,6 @@ const CustomEmoji: FC = ({ className, 'custom-emoji', 'emoji', - withGridFix && styles.withGridFix, )} onClick={onClick} onAnimationEnd={onAnimationEnd} diff --git a/src/components/common/helpers/renderTextWithEntities.tsx b/src/components/common/helpers/renderTextWithEntities.tsx index 3453d6f9d..2618106ac 100644 --- a/src/components/common/helpers/renderTextWithEntities.tsx +++ b/src/components/common/helpers/renderTextWithEntities.tsx @@ -436,7 +436,6 @@ function processEntity({ withSharedAnimation sharedCanvasRef={sharedCanvasRef} sharedCanvasHqRef={sharedCanvasHqRef} - withGridFix={!emojiSize} observeIntersectionForLoading={observeIntersectionForLoading} observeIntersectionForPlaying={observeIntersectionForPlaying} withTranslucentThumb={withTranslucentThumbs} @@ -568,7 +567,6 @@ function processEntity({ withSharedAnimation sharedCanvasRef={sharedCanvasRef} sharedCanvasHqRef={sharedCanvasHqRef} - withGridFix={!emojiSize} observeIntersectionForLoading={observeIntersectionForLoading} observeIntersectionForPlaying={observeIntersectionForPlaying} withTranslucentThumb={withTranslucentThumbs} diff --git a/src/components/middle/message/_message-content.scss b/src/components/middle/message/_message-content.scss index ce69d50da..079fb743c 100644 --- a/src/components/middle/message/_message-content.scss +++ b/src/components/middle/message/_message-content.scss @@ -784,7 +784,6 @@ } .text-content { - text-align: center; word-break: normal; line-height: var(--emoji-only-size);