Reactions: Maximum width limitation (#2990)
This commit is contained in:
parent
e21a9ffaf3
commit
0070dfa941
@ -93,6 +93,7 @@ import {
|
|||||||
import buildClassName from '../../../util/buildClassName';
|
import buildClassName from '../../../util/buildClassName';
|
||||||
import {
|
import {
|
||||||
calculateDimensionsForMessageMedia,
|
calculateDimensionsForMessageMedia,
|
||||||
|
getStickerDimensions,
|
||||||
REM,
|
REM,
|
||||||
ROUND_VIDEO_DIMENSIONS_PX,
|
ROUND_VIDEO_DIMENSIONS_PX,
|
||||||
} from '../../common/helpers/mediaDimensions';
|
} from '../../common/helpers/mediaDimensions';
|
||||||
@ -747,6 +748,10 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
if (calculatedWidth) {
|
if (calculatedWidth) {
|
||||||
style = `width: ${calculatedWidth + extraPadding}px`;
|
style = `width: ${calculatedWidth + extraPadding}px`;
|
||||||
reactionsMaxWidth = calculatedWidth + EXTRA_SPACE_FOR_REACTIONS;
|
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)
|
const signature = (isChannel && message.postAuthorTitle)
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
max-width: calc(var(--max-width) + 2.25rem);
|
||||||
|
|
||||||
.Button {
|
.Button {
|
||||||
--reaction-background: var(--color-reaction);
|
--reaction-background: var(--color-reaction);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user