Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3529655
D7347.id25155.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
777 B
Referenced Files
None
Subscribers
None
D7347.id25155.diff
View Options
diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js
--- a/native/chat/chat-input-bar.react.js
+++ b/native/chat/chat-input-bar.react.js
@@ -690,6 +690,9 @@
updateText = (text: string) => {
this.setState({ text, textEdited: true });
+ if (this.isEditMode()) {
+ return;
+ }
this.saveDraft(text);
};
@@ -788,7 +791,15 @@
};
onPressExitEditMode = () => {
- this.props.inputState?.setEditedMessage(null);
+ this.exitEditMode();
+ };
+
+ exitEditMode = () => {
+ this.props.inputState?.setEditedMessage(null, () => {
+ this.updateText(this.props.draft);
+ this.focusAndUpdateButtonsVisibility();
+ this.updateSendButton(this.props.draft);
+ });
};
onPressJoin = () => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 8:41 PM (10 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2703114
Default Alt Text
D7347.id25155.diff (777 B)
Attached To
Mode
D7347: [native] Preserve the draft for ChatInputBar after leaving edit mode
Attached
Detach File
Event Timeline
Log In to Comment