Page MenuHomePhabricator

D9800.diff
No OneTemporary

D9800.diff

diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js
--- a/lib/reducers/user-reducer.js
+++ b/lib/reducers/user-reducer.js
@@ -19,6 +19,7 @@
} from '../actions/user-actions.js';
import {
convertUserInfosToReplaceUserOps,
+ type UserStoreOperation,
userStoreOpsHandlers,
} from '../ops/user-store-ops.js';
import { stateSyncSpecs } from '../shared/state-sync/state-sync-specs.js';
@@ -271,18 +272,35 @@
return [state, []];
}
+ const userStoreOps: UserStoreOperation[] = [];
const newUserInfos = { ...state.userInfos };
if (userInfos) {
for (const userInfo of userInfos) {
newUserInfos[userInfo.id] = userInfo;
+ userStoreOps.push({ type: 'replace_user', payload: { ...userInfo } });
}
}
if (deleteUserInfoIDs) {
for (const deleteUserInfoID of deleteUserInfoIDs) {
delete newUserInfos[deleteUserInfoID];
}
+ userStoreOps.push({
+ type: 'remove_users',
+ payload: { ids: deleteUserInfoIDs },
+ });
}
+ const processedUserInfos: UserInfos = processUserStoreOps(
+ state.userInfos,
+ userStoreOps,
+ );
+ assertUserStoresAreEqual(
+ processedUserInfos,
+ newUserInfos,
+ action.type,
+ onStateDifference,
+ );
+
const newInconsistencies = stateSyncSpecs.users.findStoreInconsistencies(
action,
state.userInfos,

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 10:47 PM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2446649
Default Alt Text
D9800.diff (1 KB)

Event Timeline