getStringFromNode: Add parent/nextSibling for fewer newlines

This commit is contained in:
Scott Nonnenberg 2023-07-14 11:09:02 -07:00 committed by Fedor Indutnyy
parent b6445a6af0
commit 3f399b1329
3 changed files with 30 additions and 10 deletions

View file

@ -741,8 +741,14 @@ export class Message extends React.PureComponent<Props, State> {
}
private canRenderStickerLikeEmoji(): boolean {
const { text, quote, storyReplyContext, attachments, previews } =
this.props;
const {
attachments,
bodyRanges,
previews,
quote,
storyReplyContext,
text,
} = this.props;
return Boolean(
text &&
@ -751,6 +757,7 @@ export class Message extends React.PureComponent<Props, State> {
!quote &&
!storyReplyContext &&
(!attachments || !attachments.length) &&
(!bodyRanges || !bodyRanges.length) &&
(!previews || !previews.length)
);
}