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 = 25; + type Props = { +threadInfo: ?ThreadInfo, +reactions?: ReactionInfo, @@ -332,4 +334,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 @@ -15,6 +15,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 { authorNameHeight } from './message-header.react.js'; import { multimediaMessageItemHeight } from './multimedia-message-utils.js'; import { getUnresolvedSidebarThreadInfo } from './sidebar-navigation.js'; @@ -73,6 +74,8 @@ inlineEngagementStyle.height + inlineEngagementStyle.marginTop + inlineEngagementStyle.marginBottom; + } else if (item.hasBeenEdited) { + height += editedLabelHeight; } return height; }