Message Meta: Fix UI with video web page (#1661)
This commit is contained in:
parent
eb6e5f5e88
commit
f2510d9b65
@ -586,6 +586,10 @@
|
||||
}
|
||||
|
||||
.message-content {
|
||||
&.has-replies:not(.custom-shape):not(.has-reactions) .WebPage.with-video .media-inner {
|
||||
margin-bottom: 1.5rem !important;
|
||||
}
|
||||
|
||||
&.has-replies:not(.custom-shape),
|
||||
&.text {
|
||||
.media-inner,
|
||||
|
||||
@ -322,6 +322,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
const hasThread = Boolean(threadInfo) && messageListType === 'thread';
|
||||
const customShape = getMessageCustomShape(message);
|
||||
const hasAnimatedEmoji = localSticker || animatedEmoji;
|
||||
const hasReactions = reactionMessage?.reactions && !areReactionsEmpty(reactionMessage.reactions);
|
||||
const asForwarded = (
|
||||
forwardInfo
|
||||
&& (!isChatWithSelf || isScheduled)
|
||||
@ -457,6 +458,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
forceSenderName,
|
||||
hasComments: threadInfo && threadInfo?.messagesCount > 0,
|
||||
hasActionButton: canForward || canFocus,
|
||||
hasReactions,
|
||||
});
|
||||
|
||||
const withAppendix = contentClassName.includes('has-appendix');
|
||||
@ -478,7 +480,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
let reactionsPosition!: ReactionsPosition;
|
||||
if (areReactionsInMeta) {
|
||||
reactionsPosition = 'in-meta';
|
||||
} else if (reactionMessage?.reactions && !areReactionsEmpty(reactionMessage.reactions)) {
|
||||
} else if (hasReactions) {
|
||||
if (customShape || ((photo || video || hasAnimatedEmoji) && !textParts)) {
|
||||
reactionsPosition = 'outside';
|
||||
} else if (asForwarded) {
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.with-video .media-inner{
|
||||
&.with-video .media-inner {
|
||||
margin-top: 0.5rem !important;
|
||||
margin-bottom: 1rem !important;
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ export function buildContentClassName(
|
||||
forceSenderName,
|
||||
hasComments,
|
||||
hasActionButton,
|
||||
hasReactions,
|
||||
}: {
|
||||
hasReply?: boolean;
|
||||
customShape?: boolean | number;
|
||||
@ -26,6 +27,7 @@ export function buildContentClassName(
|
||||
forceSenderName?: boolean;
|
||||
hasComments?: boolean;
|
||||
hasActionButton?: boolean;
|
||||
hasReactions?: boolean;
|
||||
} = {},
|
||||
) {
|
||||
const {
|
||||
@ -89,6 +91,10 @@ export function buildContentClassName(
|
||||
classNames.push('has-replies');
|
||||
}
|
||||
|
||||
if (hasReactions) {
|
||||
classNames.push('has-reactions');
|
||||
}
|
||||
|
||||
if (isViaBot) {
|
||||
classNames.push('is-via-bot');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user