Page MenuHomePhabricator

D13186.diff
No OneTemporary

D13186.diff

diff --git a/lib/shared/edit-messages-utils.js b/lib/shared/edit-messages-utils.js
--- a/lib/shared/edit-messages-utils.js
+++ b/lib/shared/edit-messages-utils.js
@@ -11,7 +11,6 @@
ComposableMessageInfo,
RawMessageInfo,
RobotextMessageInfo,
- SendEditMessageResult,
} from '../types/message-types';
import { messageTypes } from '../types/message-types-enum.js';
import type { ThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
@@ -22,12 +21,12 @@
function useEditMessage(): (
messageID: string,
newText: string,
-) => Promise<SendEditMessageResult> {
+) => Promise<void> {
const callEditMessage = useSendEditMessage();
const dispatchActionPromise = useDispatchActionPromise();
return React.useCallback(
- (messageID, newText) => {
+ async (messageID, newText) => {
const editMessagePromise = (async () => {
const result = await callEditMessage({
targetMessageID: messageID,
@@ -44,7 +43,7 @@
editMessagePromise,
);
- return editMessagePromise;
+ await editMessagePromise;
},
[dispatchActionPromise, callEditMessage],
);
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
@@ -69,10 +69,7 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { PhotoPaste } from 'lib/types/media-types.js';
import { messageTypes } from 'lib/types/message-types-enum.js';
-import type {
- MessageInfo,
- SendEditMessageResponse,
-} from 'lib/types/message-types.js';
+import type { MessageInfo } from 'lib/types/message-types.js';
import type {
RelativeMemberInfo,
ThreadInfo,
@@ -299,10 +296,7 @@
+parentThreadInfo: ?ThreadInfo,
+editedMessagePreview: ?MessagePreviewResult,
+editedMessageInfo: ?MessageInfo,
- +editMessage: (
- messageID: string,
- text: string,
- ) => Promise<SendEditMessageResponse>,
+ +editMessage: (messageID: string, text: string) => Promise<void>,
+navigation: ?ChatNavigationProp<'MessageList'>,
+overlayContext: ?OverlayContextType,
+messageEditingContext: ?MessageEditingContextType,

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 1:20 PM (19 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594078
Default Alt Text
D13186.diff (2 KB)

Event Timeline