Page MenuHomePhabricator

D7827.diff
No OneTemporary

D7827.diff

diff --git a/web/chat/message.react.js b/web/chat/message.react.js
--- a/web/chat/message.react.js
+++ b/web/chat/message.react.js
@@ -9,6 +9,8 @@
import { longAbsoluteDate } from 'lib/utils/date-utils.js';
import css from './chat-message-list.css';
+import { useEditModalContext } from './edit-message-provider.js';
+import { ComposedEditTextMessage } from './edit-text-message.react.js';
import MultimediaMessage from './multimedia-message.react.js';
import RobotextMessage from './robotext-message.react.js';
import TextMessage from './text-message.react.js';
@@ -29,8 +31,22 @@
</div>
);
}
+
+ const { editState } = useEditModalContext();
+
let message;
- if (item.messageInfo.type === messageTypes.TEXT) {
+ if (
+ item.messageInfo.id &&
+ editState?.messageInfo.messageInfo?.id === item.messageInfo.id
+ ) {
+ message = (
+ <ComposedEditTextMessage
+ item={props.item}
+ threadInfo={props.threadInfo}
+ background={true}
+ />
+ );
+ } else if (item.messageInfo.type === messageTypes.TEXT) {
message = (
<TextMessage
item={item}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 1:38 AM (22 h, 46 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2603191
Default Alt Text
D7827.diff (1 KB)

Event Timeline