Page MenuHomePhabricator

D7419.id25372.diff
No OneTemporary

D7419.id25372.diff

diff --git a/lib/reducers/message-reducer.js b/lib/reducers/message-reducer.js
--- a/lib/reducers/message-reducer.js
+++ b/lib/reducers/message-reducer.js
@@ -76,11 +76,11 @@
type ReplaceMessageOperation,
type MessageStoreOperation,
type MessageTruncationStatus,
- type ThreadMessageInfo,
type MessageTruncationStatuses,
messageTruncationStatus,
messageTypes,
defaultNumberPerThread,
+ type ThreadMessageInfo,
} from '../types/message-types.js';
import type { RawImagesMessageInfo } from '../types/messages/images.js';
import type { RawMediaMessageInfo } from '../types/messages/media.js';
@@ -1529,6 +1529,12 @@
type: 'replace',
payload: { id: localID, messageInfo },
},
+ {
+ type: 'replace_threads',
+ payload: {
+ threads: { [threadID]: threadState },
+ },
+ },
];
const processedMessageStore = processMessageStoreOperations(
@@ -1536,16 +1542,24 @@
messageStoreOperations,
);
+ const newMessageStore = {
+ ...messageStore,
+ threads: {
+ ...messageStore.threads,
+ [threadID]: threadState,
+ },
+ messages: processedMessageStore.messages,
+ };
+
+ assertMessageStoreThreadsAreEqual(
+ processedMessageStore,
+ newMessageStore,
+ action.type,
+ );
+
return {
messageStoreOperations,
- messageStore: {
- ...messageStore,
- threads: {
- ...messageStore.threads,
- [threadID]: threadState,
- },
- messages: processedMessageStore.messages,
- },
+ messageStore: newMessageStore,
};
} else if (action.type === processServerRequestsActionType) {
const {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 7:12 PM (20 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2501135
Default Alt Text
D7419.id25372.diff (1 KB)

Event Timeline