Page MenuHomePhabricator

D11287.diff
No OneTemporary

D11287.diff

diff --git a/lib/reducers/integrity-reducer.js b/lib/reducers/integrity-reducer.js
--- a/lib/reducers/integrity-reducer.js
+++ b/lib/reducers/integrity-reducer.js
@@ -9,6 +9,7 @@
keyserverRegisterActionTypes,
} from '../actions/user-actions.js';
import { extractKeyserverIDFromID } from '../keyserver-conn/keyserver-call-utils.js';
+import { integrityStoreOpsHandlers } from '../ops/integrity-store-ops.js';
import type { ThreadStoreOperation } from '../ops/thread-store-ops';
import type { IntegrityStore } from '../types/integrity-types';
import type { RawThreadInfo } from '../types/minimally-encoded-thread-permissions-types.js';
@@ -16,6 +17,8 @@
import { fullStateSyncActionType } from '../types/socket-types.js';
import { hash } from '../utils/objects.js';
+const { processStoreOperations: processStoreOps } = integrityStoreOpsHandlers;
+
function reduceIntegrityStore(
state: IntegrityStore,
action: BaseAction,
@@ -51,14 +54,12 @@
.filter(([, info]) => !!info)
.map(([id, info]) => [id, hash(info)]),
);
-
- newState = {
- ...newState,
- threadHashes: {
- ...newState.threadHashes,
- ...newThreadHashes,
- },
+ const replaceOperation = {
+ type: 'replace_integrity_thread_hashes',
+ payload: { threadHashes: newThreadHashes },
};
+
+ newState = processStoreOps(state, [replaceOperation]);
}
if (action.payload.threadHashingStatus) {
newState = {

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 3:43 AM (22 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2592669
Default Alt Text
D11287.diff (1 KB)

Event Timeline