Page MenuHomePhabricator

D10771.id.diff
No OneTemporary

D10771.id.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
@@ -462,11 +462,11 @@
} else {
lateResponsesSet.delete(messageID);
}
- return {
- ...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
connection: {
...state.keyserverInfos[keyserverID].connection,
@@ -475,13 +475,18 @@
},
},
};
- } else if (action.type === updateDisconnectedBarActionType) {
- const { keyserverID } = action.payload;
+
return {
...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
+ } else if (action.type === updateDisconnectedBarActionType) {
+ const { keyserverID } = action.payload;
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
connection: {
...state.keyserverInfos[keyserverID].connection,
@@ -490,6 +495,10 @@
},
},
};
+ return {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
} else if (action.type === setDeviceTokenActionTypes.success) {
const { deviceTokens } = action.payload;
const keyserverInfos: { ...KeyserverInfos } = { ...state.keyserverInfos };
@@ -505,11 +514,11 @@
};
} else if (action.type === setConnectionIssueActionType) {
const { connectionIssue, keyserverID } = 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,
@@ -518,6 +527,10 @@
},
},
};
+ return {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ };
}
return state;

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 7:26 PM (8 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2700890
Default Alt Text
D10771.id.diff (2 KB)

Event Timeline