Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3355844
D10288.id34737.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10288.id34737.diff
View Options
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
@@ -516,6 +516,9 @@
lateResponses: [],
showDisconnectedBar: false,
};
+
+export const setConnectionIssueActionType = 'SET_CONNECTION_ISSUE';
+
export const updateConnectionStatusActionType = 'UPDATE_CONNECTION_STATUS';
export type UpdateConnectionStatusPayload = {
+status: ConnectionStatus,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 3:50 PM (20 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576615
Default Alt Text
D10288.id34737.diff (2 KB)
Attached To
Mode
D10288: [lib] Add setConnectionIssueActionType
Attached
Detach File
Event Timeline
Log In to Comment