Page MenuHomePhabricator

D10763.id35918.diff
No OneTemporary

D10763.id35918.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
@@ -170,16 +170,21 @@
};
} else if (action.type === fullStateSyncActionType) {
const { keyserverID } = action.payload;
- return {
- ...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
updatesCurrentAsOf: action.payload.updatesCurrentAsOf,
},
},
};
+
+ return {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
} else if (action.type === incrementalStateSyncActionType) {
const { keyserverID } = action.payload;
let { deviceToken } = state.keyserverInfos[keyserverID];
@@ -192,17 +197,22 @@
break;
}
}
- return {
- ...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
updatesCurrentAsOf: action.payload.updatesResult.currentAsOf,
deviceToken,
},
},
};
+
+ return {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
} else if (action.type === processUpdatesActionType) {
const { keyserverID } = action.payload;
const updatesCurrentAsOf = Math.max(

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 2:59 PM (21 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576486
Default Alt Text
D10763.id35918.diff (1 KB)

Event Timeline