Comments Button: Fix width on unsupported messages (#5002)
This commit is contained in:
parent
8f9731a5cf
commit
a3ab9759d5
@ -125,7 +125,8 @@
|
||||
.voice &,
|
||||
.poll &,
|
||||
.text &,
|
||||
.giveaway & {
|
||||
.giveaway &,
|
||||
.unsupported & {
|
||||
border-top: 1px solid var(--color-borders);
|
||||
}
|
||||
|
||||
@ -144,7 +145,8 @@
|
||||
.message-content.poll &,
|
||||
.message-content.giveaway &,
|
||||
.message-content.has-solid-background.text &,
|
||||
.message-content.has-solid-background.is-forwarded & {
|
||||
.message-content.has-solid-background.is-forwarded &,
|
||||
.message-content.unsupported & {
|
||||
width: calc(100% + 1rem);
|
||||
}
|
||||
|
||||
|
||||
@ -41,11 +41,12 @@ export function buildContentClassName(
|
||||
const { paidMedia } = getMessageContent(message);
|
||||
const { photo: paidMediaPhoto, video: paidMediaVideo } = getSingularPaidMedia(paidMedia);
|
||||
|
||||
const content = getMessageContent(message);
|
||||
const {
|
||||
photo = paidMediaPhoto, video = paidMediaVideo,
|
||||
audio, voice, document, poll, webPage, contact, location, invoice, storyData,
|
||||
giveaway, giveawayResults,
|
||||
} = getMessageContent(message);
|
||||
} = content;
|
||||
const text = album?.hasMultipleCaptions ? undefined : getMessageContent(album?.captionMessage || message).text;
|
||||
const hasFactCheck = Boolean(message.factCheck?.text);
|
||||
|
||||
@ -84,6 +85,10 @@ export function buildContentClassName(
|
||||
classNames.push('no-text');
|
||||
}
|
||||
|
||||
if (!Object.keys(content).length) {
|
||||
classNames.push('unsupported');
|
||||
}
|
||||
|
||||
if (hasActionButton) {
|
||||
classNames.push('has-action-button');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user