Page MenuHomePhabricator

D10766.diff
No OneTemporary

D10766.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
@@ -226,39 +226,51 @@
action.payload.updatesResult.currentAsOf,
state.keyserverInfos[keyserverID].updatesCurrentAsOf,
);
- return {
- ...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
updatesCurrentAsOf,
},
},
};
- } else if (action.type === setURLPrefix) {
return {
...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [ashoatKeyserverID]: {
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
+ } else if (action.type === setURLPrefix) {
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: ashoatKeyserverID,
+ keyserverInfo: {
...state.keyserverInfos[ashoatKeyserverID],
urlPrefix: action.payload,
},
},
};
- } else if (action.type === updateLastCommunicatedPlatformDetailsActionType) {
- const { keyserverID, platformDetails } = action.payload;
return {
...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
+ } else if (action.type === updateLastCommunicatedPlatformDetailsActionType) {
+ const { keyserverID, platformDetails } = action.payload;
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
lastCommunicatedPlatformDetails: platformDetails,
},
},
};
+ return {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
} else if (action.type === keyserverRegisterActionTypes.success) {
state = {
...state,

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 5:29 AM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2592887
Default Alt Text
D10766.diff (2 KB)

Event Timeline