Message Content: Fix media corners in forwards (#4878)

This commit is contained in:
Alexander Zinchuk 2024-08-29 15:52:24 +02:00
parent 98962ffd92
commit c7092ce13c
2 changed files with 4 additions and 4 deletions

View File

@ -646,7 +646,7 @@
.message-content {
&.has-replies:not(.custom-shape),
&.has-footer:not(.web-page) {
&.has-footer:not(.web-page):not(.is-forwarded) {
.media-inner,
.Album {
--border-bottom-left-radius: 0;
@ -654,7 +654,7 @@
}
}
&.text.is-inverted-media {
&.text.is-inverted-media:not(.is-forwarded) {
.Album,
.media-inner {
--border-top-left-radius: 0;

View File

@ -918,7 +918,7 @@ const Message: FC<OwnProps & StateProps> = ({
contentWidth = width;
}
calculatedWidth = Math.max(getMinMediaWidth(text?.text, isMediaWithCommentButton), width);
if (invoice?.extendedMedia && calculatedWidth - width > NO_MEDIA_CORNERS_THRESHOLD) {
if (!asForwarded && invoice?.extendedMedia && calculatedWidth - width > NO_MEDIA_CORNERS_THRESHOLD) {
noMediaCorners = true;
}
}
@ -926,7 +926,7 @@ const Message: FC<OwnProps & StateProps> = ({
calculatedWidth = Math.max(
getMinMediaWidth(text?.text, isMediaWithCommentButton), albumLayout.containerStyle.width,
);
if (calculatedWidth - albumLayout.containerStyle.width > NO_MEDIA_CORNERS_THRESHOLD) {
if (!asForwarded && calculatedWidth - albumLayout.containerStyle.width > NO_MEDIA_CORNERS_THRESHOLD) {
noMediaCorners = true;
}
}