Page MenuHomePhabricator

D10768.diff
No OneTemporary

D10768.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
@@ -288,11 +288,11 @@
};
} else if (action.type === updateConnectionStatusActionType) {
const { keyserverID, status } = action.payload;
- return {
- ...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
connection: {
...state.keyserverInfos[keyserverID].connection,
@@ -302,13 +302,17 @@
},
},
};
- } else if (action.type === unsupervisedBackgroundActionType) {
- const { keyserverID } = action.payload;
return {
...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
+ } else if (action.type === unsupervisedBackgroundActionType) {
+ const { keyserverID } = action.payload;
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
connection: {
...state.keyserverInfos[keyserverID].connection,
@@ -318,6 +322,10 @@
},
},
};
+ return {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
} else if (action.type === queueActivityUpdatesActionType) {
const { activityUpdates, keyserverID } = action.payload;
const oldConnection = state.keyserverInfos[keyserverID].connection;

File Metadata

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

Event Timeline