Page MenuHomePhabricator

D7346.id24795.diff
No OneTemporary

D7346.id24795.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
@@ -65,7 +65,13 @@
inputState,
'inputState should be set in TextMessageTooltipModal.onPressEdit',
);
- inputState.setEditedMessageID(messageInfo.id);
+ const updateInputBar = () => {
+ inputState.editInputMessage({
+ message: text,
+ mode: 'replace',
+ });
+ };
+ inputState.setEditedMessageID(messageInfo.id, updateInputBar);
};
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
@@ -1210,10 +1210,13 @@
this.editInputBarCallbacks.push(callbackEditInputBar);
};
- setEditedMessageID = (messageID: ?string) => {
- this.setState({
- editState: { editedMessageID: messageID },
- });
+ setEditedMessageID = (messageID: ?string, callback?: () => void) => {
+ this.setState(
+ {
+ editState: { editedMessageID: messageID },
+ },
+ callback,
+ );
};
removeEditInputMessageListener = (
diff --git a/native/input/input-state.js b/native/input/input-state.js
--- a/native/input/input-state.js
+++ b/native/input/input-state.js
@@ -64,7 +64,10 @@
pendingThreadUpdateHandler: ?(ThreadInfo) => mixed,
) => void,
+editState: EditState,
- +setEditedMessageID: (editedMessageID: ?string) => void,
+ +setEditedMessageID: (
+ editedMessageID: ?string,
+ callback?: () => void,
+ ) => void,
};
const InputStateContext: React.Context<?InputState> =

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 10:01 AM (21 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2451393
Default Alt Text
D7346.id24795.diff (1 KB)

Event Timeline