Page MenuHomePhorge

D10551.1768934418.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D10551.1768934418.diff

diff --git a/lib/components/integrity-handler.react.js b/lib/components/integrity-handler.react.js
--- a/lib/components/integrity-handler.react.js
+++ b/lib/components/integrity-handler.react.js
@@ -22,7 +22,13 @@
React.useEffect(() => {
if (integrityStore.threadHashingStatus === 'starting') {
- const threadIDs = Object.keys(threadInfos);
+ const integrityStoreThreads = new Set<string>(
+ Object.keys(integrityStore.threadHashes),
+ );
+
+ const threadIDs = Object.keys(threadInfos).filter(
+ key => !integrityStoreThreads.has(key),
+ );
setBatches(splitIntoChunks(threadIDs, BATCH_SIZE));
dispatch({
type: updateIntegrityStoreActionType,
@@ -32,7 +38,12 @@
clearTimeout(timeout.current);
setBatches(null);
}
- }, [dispatch, integrityStore.threadHashingStatus, threadInfos]);
+ }, [
+ dispatch,
+ integrityStore.threadHashes,
+ integrityStore.threadHashingStatus,
+ threadInfos,
+ ]);
React.useEffect(() => {
if (!batches) {
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
@@ -4,6 +4,7 @@
import { updateIntegrityStoreActionType } from '../actions/integrity-actions.js';
import { siweAuthActionTypes } from '../actions/siwe-actions.js';
import {
+ keyserverAuthActionTypes,
logInActionTypes,
registerActionTypes,
} from '../actions/user-actions.js';
@@ -30,6 +31,8 @@
state.threadHashingStatus !== 'completed')
) {
return { threadHashes: {}, threadHashingStatus: 'starting' };
+ } else if (action.type === keyserverAuthActionTypes.success) {
+ return { ...state, threadHashingStatus: 'starting' };
}
let newState = state;
if (action.type === updateIntegrityStoreActionType) {

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 20, 6:40 PM (9 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5960929
Default Alt Text
D10551.1768934418.diff (1 KB)

Event Timeline