Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32375051
D7066.1765327911.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D7066.1765327911.diff
View Options
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 = (
<InlineEngagement
threadInfo={item.threadCreatedFromMessage}
reactions={item.reactions}
positioning={positioning}
shouldRenderAvatars={shouldRenderAvatars}
+ label={label}
/>
);
}
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;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 10, 12:51 AM (19 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5859377
Default Alt Text
D7066.1765327911.diff (2 KB)
Attached To
Mode
D7066: [native] Displaying 'Edit' labels next to edited messages
Attached
Detach File
Event Timeline
Log In to Comment