Page MenuHomePhabricator

D13346.id44200.diff
No OneTemporary

D13346.id44200.diff

diff --git a/lib/shared/dm-ops/dm-op-spec.js b/lib/shared/dm-ops/dm-op-spec.js
--- a/lib/shared/dm-ops/dm-op-spec.js
+++ b/lib/shared/dm-ops/dm-op-spec.js
@@ -1,6 +1,7 @@
// @flow
import type { DMOperation, DMOperationResult } from '../../types/dm-ops.js';
+import type { RawEntryInfos } from '../../types/entry-types.js';
import type { RawMessageInfo } from '../../types/message-types.js';
import type { NotificationsCreationData } from '../../types/notif-types.js';
import type { RawThreadInfos } from '../../types/thread-types.js';
@@ -9,6 +10,7 @@
// Needed to fetch sidebar source messages
+fetchMessage: (messageID: string) => Promise<?RawMessageInfo>,
+threadInfos: RawThreadInfos,
+ +entryInfos: RawEntryInfos,
};
export type DMOperationSpec<DMOp: DMOperation> = {
diff --git a/lib/shared/dm-ops/process-dm-ops.js b/lib/shared/dm-ops/process-dm-ops.js
--- a/lib/shared/dm-ops/process-dm-ops.js
+++ b/lib/shared/dm-ops/process-dm-ops.js
@@ -41,13 +41,15 @@
) => Promise<void> {
const fetchMessage = useGetLatestMessageEdit();
const threadInfos = useSelector(state => state.threadStore.threadInfos);
+ const entryInfos = useSelector(state => state.entryStore.entryInfos);
const utilities = React.useMemo(
() => ({
fetchMessage,
threadInfos,
+ entryInfos,
}),
- [fetchMessage, threadInfos],
+ [fetchMessage, threadInfos, entryInfos],
);
const dispatchWithMetadata = useDispatchWithMetadata();
@@ -321,6 +323,7 @@
) => Promise<$ReadOnlyArray<string>> {
const fetchMessage = useGetLatestMessageEdit();
const threadInfos = useSelector(state => state.threadStore.threadInfos);
+ const entryInfos = useSelector(state => state.entryStore.entryInfos);
const { getDMOpsSendingPromise } = usePeerToPeerCommunication();
const dispatchWithMetadata = useDispatchWithMetadata();
const allPeerUserIDAndDeviceIDs = useSelector(getAllPeerUserIDAndDeviceIDs);
@@ -330,8 +333,9 @@
() => ({
fetchMessage,
threadInfos,
+ entryInfos,
}),
- [fetchMessage, threadInfos],
+ [fetchMessage, threadInfos, entryInfos],
);
return React.useCallback(

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 20, 7:58 AM (17 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2146753
Default Alt Text
D13346.id44200.diff (2 KB)

Event Timeline