Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3520623
D6966.id24405.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6966.id24405.diff
View Options
diff --git a/lib/selectors/chat-selectors.js b/lib/selectors/chat-selectors.js
--- a/lib/selectors/chat-selectors.js
+++ b/lib/selectors/chat-selectors.js
@@ -291,6 +291,7 @@
endsCluster: boolean,
+threadCreatedFromMessage: ?ThreadInfo,
+reactions: ReactionInfo,
+ +hasBeenEdited: boolean,
};
export type ChatMessageItem = { itemType: 'loader' } | ChatMessageInfoItem;
@@ -397,13 +398,18 @@
continue;
}
+ let hasBeenEdited = false;
if (
originalMessageInfo.type === messageTypes.TEXT &&
originalMessageInfo.id
) {
const newText = targetMessageEditMap.get(originalMessageInfo.id);
if (newText !== undefined) {
- originalMessageInfo = { ...originalMessageInfo, text: newText };
+ hasBeenEdited = true;
+ originalMessageInfo = {
+ ...originalMessageInfo,
+ text: newText,
+ };
}
}
@@ -489,6 +495,7 @@
endsCluster: false,
threadCreatedFromMessage,
reactions: renderedReactions,
+ hasBeenEdited,
});
} else {
invariant(
diff --git a/native/chat/chat-item-height-measurer.react.js b/native/chat/chat-item-height-measurer.react.js
--- a/native/chat/chat-item-height-measurer.react.js
+++ b/native/chat/chat-item-height-measurer.react.js
@@ -101,6 +101,7 @@
threadCreatedFromMessage: item.threadCreatedFromMessage,
pendingUploads,
reactions: item.reactions,
+ hasBeenEdited: item.hasBeenEdited,
...sizes,
};
}
@@ -126,6 +127,7 @@
threadCreatedFromMessage: item.threadCreatedFromMessage,
contentHeight: height,
reactions: item.reactions,
+ hasBeenEdited: item.hasBeenEdited,
};
}
invariant(
diff --git a/native/types/chat-types.js b/native/types/chat-types.js
--- a/native/types/chat-types.js
+++ b/native/types/chat-types.js
@@ -38,6 +38,7 @@
+contentHeight: number,
+threadCreatedFromMessage: ?ThreadInfo,
+reactions: ReactionInfo,
+ +hasBeenEdited: ?boolean,
};
export type MultimediaContentSizes = {
@@ -58,6 +59,7 @@
+threadCreatedFromMessage: ?ThreadInfo,
+pendingUploads: ?MessagePendingUploads,
+reactions: ReactionInfo,
+ +hasBeenEdited: ?boolean,
};
export type ChatMessageInfoItemWithHeight =
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 12:54 AM (12 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2697631
Default Alt Text
D6966.id24405.diff (2 KB)
Attached To
Mode
D6966: [lib] Add 'hasBeenEdited' status to messages
Attached
Detach File
Event Timeline
Log In to Comment