Page MenuHomePhabricator

D7346.id25665.diff
No OneTemporary

D7346.id25665.diff

diff --git a/native/chat/text-message-tooltip-modal.react.js b/native/chat/text-message-tooltip-modal.react.js
--- a/native/chat/text-message-tooltip-modal.react.js
+++ b/native/chat/text-message-tooltip-modal.react.js
@@ -63,8 +63,14 @@
inputState,
'inputState should be set in TextMessageTooltipModal.onPressEdit',
);
- inputState.setEditedMessage(messageInfo);
- }, [inputState, messageInfo]);
+ const updateInputBar = () => {
+ inputState.editInputMessage({
+ message: text,
+ mode: 'replace',
+ });
+ };
+ inputState.setEditedMessage(messageInfo, updateInputBar);
+ }, [inputState, messageInfo, text]);
const renderEditIcon = React.useCallback(
style => <SWMansionIcon name="edit-1" style={style} size={16} />,
[],
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -1207,10 +1207,13 @@
this.editInputBarCallbacks.push(callbackEditInputBar);
};
- setEditedMessage = (editedMessage: ?MessageInfo) => {
- this.setState({
- editState: { editedMessage },
- });
+ setEditedMessage = (editedMessage: ?MessageInfo, callback?: () => void) => {
+ this.setState(
+ {
+ editState: { editedMessage },
+ },
+ callback,
+ );
};
removeEditInputMessageListener = (

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 10:02 AM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2451361
Default Alt Text
D7346.id25665.diff (1 KB)

Event Timeline