Reactions: Maximum width limitation (#2990)

This commit is contained in:
Alexander Zinchuk 2023-04-15 13:51:50 +02:00
parent e21a9ffaf3
commit 0070dfa941
2 changed files with 6 additions and 0 deletions

View File

@ -93,6 +93,7 @@ import {
import buildClassName from '../../../util/buildClassName';
import {
calculateDimensionsForMessageMedia,
getStickerDimensions,
REM,
ROUND_VIDEO_DIMENSIONS_PX,
} from '../../common/helpers/mediaDimensions';
@ -747,6 +748,10 @@ const Message: FC<OwnProps & StateProps> = ({
if (calculatedWidth) {
style = `width: ${calculatedWidth + extraPadding}px`;
reactionsMaxWidth = calculatedWidth + EXTRA_SPACE_FOR_REACTIONS;
} else if (sticker) {
const { width } = getStickerDimensions(sticker, isMobile);
style = `width: ${width + extraPadding}px`;
reactionsMaxWidth = width + EXTRA_SPACE_FOR_REACTIONS;
}
const signature = (isChannel && message.postAuthorTitle)

View File

@ -5,6 +5,7 @@
flex-wrap: wrap;
margin-top: 0.25rem;
overflow: visible;
max-width: calc(var(--max-width) + 2.25rem);
.Button {
--reaction-background: var(--color-reaction);