Page MenuHomePhabricator

D7827.id26506.diff
No OneTemporary

D7827.id26506.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,23 @@
</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}
+ width={400}
+ ></ComposedEditTextMessage>
+ );
+ } else if (item.messageInfo.type === messageTypes.TEXT) {
message = (
<TextMessage
item={item}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 2:59 AM (18 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2603439
Default Alt Text
D7827.id26506.diff (1 KB)

Event Timeline