Page MenuHomePhabricator

D10770.diff
No OneTemporary

D10770.diff

diff --git a/lib/reducers/keyserver-reducer.js b/lib/reducers/keyserver-reducer.js
--- a/lib/reducers/keyserver-reducer.js
+++ b/lib/reducers/keyserver-reducer.js
@@ -25,6 +25,7 @@
keyserverStoreOpsHandlers,
type ReplaceKeyserverOperation,
type RemoveKeyserversOperation,
+ type KeyserverStoreOperation,
} from '../ops/keyserver-store-ops.js';
import { queueActivityUpdatesActionType } from '../types/activity-types.js';
import type { KeyserverInfos, KeyserverStore } from '../types/keyserver-types';
@@ -396,22 +397,28 @@
) {
// We want to remove all keyservers but Ashoat's keyserver
const oldConnection = state.keyserverInfos[ashoatKeyserverID].connection;
-
- const keyserverInfos = {
- [ashoatKeyserverID]: {
- ...state.keyserverInfos[ashoatKeyserverID],
- connection: {
- ...oldConnection,
- connectionIssue: null,
- queuedActivityUpdates: [],
+ const operations: KeyserverStoreOperation[] = [
+ { type: 'remove_all_keyservers' },
+ ];
+ operations.push({
+ type: 'replace_keyserver',
+ payload: {
+ id: ashoatKeyserverID,
+ keyserverInfo: {
+ ...state.keyserverInfos[ashoatKeyserverID],
+ connection: {
+ ...oldConnection,
+ connectionIssue: null,
+ queuedActivityUpdates: [],
+ },
+ cookie: null,
},
- cookie: null,
},
- };
+ });
return {
...state,
- keyserverInfos,
+ keyserverInfos: processStoreOps(state.keyserverInfos, operations),
};
} else if (action.type === deleteKeyserverAccountActionTypes.success) {
const keyserverIDsToRemove = new Set<string>(action.payload.keyserverIDs);

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 2:09 PM (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576252
Default Alt Text
D10770.diff (1 KB)

Event Timeline