Page MenuHomePhabricator

D4190.diff
No OneTemporary

D4190.diff

diff --git a/lib/reducers/thread-reducer.js b/lib/reducers/thread-reducer.js
--- a/lib/reducers/thread-reducer.js
+++ b/lib/reducers/thread-reducer.js
@@ -352,11 +352,9 @@
};
}
- const newThreadInfos = { ...state.threadInfos };
const threadStoreOperations: ThreadStoreOperation[] = [];
if (rawThreadInfos) {
for (const rawThreadInfo of rawThreadInfos) {
- newThreadInfos[rawThreadInfo.id] = rawThreadInfo;
threadStoreOperations.push({
type: 'replace',
payload: {
@@ -367,9 +365,6 @@
}
}
if (deleteThreadIDs) {
- for (const deleteThreadID of deleteThreadIDs) {
- delete newThreadInfos[deleteThreadID];
- }
threadStoreOperations.push({
type: 'remove',
payload: {
@@ -378,21 +373,19 @@
});
}
+ const updatedThreadStore = processThreadStoreOperations(
+ state,
+ threadStoreOperations,
+ );
+
const newThreadInconsistencies = findInconsistencies(
action,
state.threadInfos,
- newThreadInfos,
- );
- const updatedStore = {
- threadInfos: newThreadInfos,
- };
- const processedStore = processThreadStoreOperations(
- state,
- threadStoreOperations,
+ updatedThreadStore.threadInfos,
);
- assertThreadStoreThreadsAreEqual(processedStore, updatedStore, action.type);
+
return {
- threadStore: updatedStore,
+ threadStore: updatedThreadStore,
newThreadInconsistencies,
threadStoreOperations,
};

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 5:29 PM (21 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576875
Default Alt Text
D4190.diff (1 KB)

Event Timeline