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 @@ -31,11 +31,22 @@ threadStoreOperations: $ReadOnlyArray, ): IntegrityStore { if (action.type === fullStateSyncActionType) { + const removeAllOperation = { type: 'remove_all_integrity_thread_hashes' }; const threadHashesArray = Object.entries(state.threadHashes).filter( ([key]) => extractKeyserverIDFromID(key) !== action.payload.keyserverID, ); const threadHashes = Object.fromEntries(threadHashesArray); - return { threadHashes, threadHashingStatus: 'starting' }; + const replaceOperation = { + type: 'replace_integrity_thread_hashes', + payload: { threadHashes }, + }; + return { + threadHashes: processStoreOps(state, [ + removeAllOperation, + replaceOperation, + ]).threadHashes, + threadHashingStatus: 'starting', + }; } else if ( action.type === logInActionTypes.success || action.type === siweAuthActionTypes.success ||