Message: Display boost count only on first grouped message (#4651)
This commit is contained in:
parent
e485f5a609
commit
7803e4dbe2
@ -503,6 +503,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
&& !forwardInfo.isLinkedChannelPost
|
&& !forwardInfo.isLinkedChannelPost
|
||||||
&& !isCustomShape
|
&& !isCustomShape
|
||||||
) || Boolean(message.content.storyData && !message.content.storyData.isMention);
|
) || Boolean(message.content.storyData && !message.content.storyData.isMention);
|
||||||
|
const canShowSenderBoosts = Boolean(senderBoosts) && !asForwarded && isFirstInGroup;
|
||||||
const isStoryMention = message.content.storyData?.isMention;
|
const isStoryMention = message.content.storyData?.isMention;
|
||||||
const isAlbum = Boolean(album) && album!.messages.length > 1
|
const isAlbum = Boolean(album) && album!.messages.length > 1
|
||||||
&& !album?.messages.some((msg) => Object.keys(msg.content).length === 0);
|
&& !album?.messages.some((msg) => Object.keys(msg.content).length === 0);
|
||||||
@ -1359,7 +1360,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
{Boolean(senderBoosts) && (
|
{canShowSenderBoosts && (
|
||||||
<span className="sender-boosts" aria-hidden>
|
<span className="sender-boosts" aria-hidden>
|
||||||
<Icon name={senderBoosts > 1 ? 'boosts' : 'boost'} />
|
<Icon name={senderBoosts > 1 ? 'boosts' : 'boost'} />
|
||||||
{senderBoosts > 1 ? senderBoosts : undefined}
|
{senderBoosts > 1 ? senderBoosts : undefined}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user