Page MenuHomePhabricator

D7410.id25368.diff
No OneTemporary

D7410.id25368.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
@@ -179,10 +179,6 @@
payload: { id: messageID(messageInfo), messageInfo },
}),
);
- const messageStoreOperations = [
- { type: 'remove_all' },
- ...messageStoreReplaceOperations,
- ];
const threadsToMessageIDs =
mapThreadsToMessageIDsFromOrderedMessageInfos(orderedMessageInfos);
@@ -205,6 +201,19 @@
}
threads[threadID] = newThread();
}
+
+ const messageStoreOperations = [
+ { type: 'remove_all' },
+ {
+ type: 'remove_all_threads',
+ },
+ {
+ type: 'replace_threads',
+ payload: { threads },
+ },
+ ...messageStoreReplaceOperations,
+ ];
+
return {
messageStoreOperations,
messageStore: { messages, threads, local: {}, currentAsOf },
@@ -806,6 +815,12 @@
messageStoreOperations,
);
+ assertMessageStoreThreadsAreEqual(
+ processedMessageStore,
+ freshStore,
+ `${action.type} | fresh store`,
+ );
+
return {
messageStoreOperations,
messageStore: { ...freshStore, messages: processedMessageStore.messages },

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 12:49 AM (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2506208
Default Alt Text
D7410.id25368.diff (1 KB)

Event Timeline