diff --git a/native/chat/composed-message.react.js b/native/chat/composed-message.react.js --- a/native/chat/composed-message.react.js +++ b/native/chat/composed-message.react.js @@ -73,6 +73,7 @@ ...viewProps } = this.props; const { id, creator } = item.messageInfo; + const { hasBeenEdited } = item; const { isViewer } = creator; const alignStyle = isViewer @@ -166,15 +167,18 @@ let inlineEngagement = null; if ( item.threadCreatedFromMessage || - Object.keys(item.reactions).length > 0 + Object.keys(item.reactions).length > 0 || + hasBeenEdited ) { const positioning = isViewer ? 'right' : 'left'; + const label = hasBeenEdited ? 'Edited' : null; inlineEngagement = ( ); } diff --git a/native/chat/inline-engagement.react.js b/native/chat/inline-engagement.react.js --- a/native/chat/inline-engagement.react.js +++ b/native/chat/inline-engagement.react.js @@ -28,6 +28,8 @@ import { useStyles } from '../themes/colors.js'; import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js'; +const editedLabelHeight = 24; + type Props = { +threadInfo: ?ThreadInfo, +reactions?: ReactionInfo, @@ -337,4 +339,4 @@ ); } -export { InlineEngagement, TooltipInlineEngagement }; +export { InlineEngagement, TooltipInlineEngagement, editedLabelHeight }; diff --git a/native/chat/utils.js b/native/chat/utils.js --- a/native/chat/utils.js +++ b/native/chat/utils.js @@ -13,6 +13,7 @@ import { clusterEndHeight, inlineEngagementStyle } from './chat-constants.js'; import { ChatContext, useHeightMeasurer } from './chat-context.js'; import { failedSendHeight } from './failed-send.react.js'; +import { editedLabelHeight } from './inline-engagement.react.js'; import { useNativeMessageListData, type NativeChatMessageItem, @@ -75,6 +76,8 @@ inlineEngagementStyle.height + inlineEngagementStyle.marginTop + inlineEngagementStyle.marginBottom; + } else if (item.hasBeenEdited) { + height += editedLabelHeight; } return height; }