Page MenuHomePhabricator

D10288.id34469.diff
No OneTemporary

D10288.id34469.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
@@ -27,6 +27,7 @@
updateConnectionStatusActionType,
setLateResponseActionType,
updateDisconnectedBarActionType,
+ setConnectionIssueActionType,
} from '../types/socket-types.js';
import { updateTypes } from '../types/update-types-enum.js';
import { processUpdatesActionType } from '../types/update-types.js';
@@ -364,6 +365,21 @@
...state,
keyserverInfos,
};
+ } else if (action.type === setConnectionIssueActionType) {
+ const { connectionIssue, keyserverID } = action.payload;
+ return {
+ ...state,
+ keyserverInfos: {
+ ...state.keyserverInfos,
+ [keyserverID]: {
+ ...state.keyserverInfos[keyserverID],
+ connection: {
+ ...state.keyserverInfos[keyserverID].connection,
+ connectionIssue,
+ },
+ },
+ },
+ };
}
return state;
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -98,6 +98,7 @@
} from './search-types.js';
import type { SetSessionPayload } from './session-types.js';
import type {
+ ConnectionIssue,
StateSyncFullActionPayload,
StateSyncIncrementalActionPayload,
UpdateConnectionStatusPayload,
@@ -1236,6 +1237,10 @@
| {
+type: 'SET_CUSTOM_SERVER',
+payload: string,
+ }
+ | {
+ +type: 'SET_CONNECTION_ISSUE',
+ +payload: { connectionIssue: ConnectionIssue, keyserverID: string },
};
export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string);
diff --git a/lib/types/socket-types.js b/lib/types/socket-types.js
--- a/lib/types/socket-types.js
+++ b/lib/types/socket-types.js
@@ -522,6 +522,9 @@
lateResponses: [],
showDisconnectedBar: false,
};
+
+export const setConnectionIssueActionType = 'SET_CONNECTION_ISSUE';
+
export const updateConnectionStatusActionType = 'UPDATE_CONNECTION_STATUS';
export type UpdateConnectionStatusPayload = {
+status: ConnectionStatus,

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 4:38 PM (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576761
Default Alt Text
D10288.id34469.diff (2 KB)

Event Timeline