Page MenuHomePhabricator

D10948.id36648.diff
No OneTemporary

D10948.id36648.diff

diff --git a/lib/keyserver-conn/keyserver-conn-types.js b/lib/keyserver-conn/keyserver-conn-types.js
--- a/lib/keyserver-conn/keyserver-conn-types.js
+++ b/lib/keyserver-conn/keyserver-conn-types.js
@@ -93,4 +93,7 @@
+keyserverID: string,
};
+export const setSessionRecoveryInProgressActionType =
+ 'SET_SESSION_RECOVERY_IN_PROGRESS';
+
export { setNewSessionActionType, setNewSession };
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
@@ -26,6 +26,7 @@
setLateResponseActionType,
updateKeyserverReachabilityActionType,
setConnectionIssueActionType,
+ setSessionRecoveryInProgressActionType,
} from '../keyserver-conn/keyserver-conn-types.js';
import {
keyserverStoreOpsHandlers,
@@ -619,6 +620,28 @@
},
keyserverStoreOperations: [operation],
};
+ } else if (action.type === setSessionRecoveryInProgressActionType) {
+ const { sessionRecoveryInProgress, keyserverID } = action.payload;
+ const operation: ReplaceKeyserverOperation = {
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
+ ...state.keyserverInfos[keyserverID],
+ connection: {
+ ...state.keyserverInfos[keyserverID].connection,
+ sessionRecoveryInProgress,
+ },
+ },
+ },
+ };
+ return {
+ keyserverStore: {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, [operation]),
+ },
+ keyserverStoreOperations: [operation],
+ };
}
return {
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
@@ -1339,6 +1339,10 @@
| {
+type: 'SET_CONNECTION_ISSUE',
+payload: { +connectionIssue: ?ConnectionIssue, +keyserverID: string },
+ }
+ | {
+ +type: 'SET_SESSION_RECOVERY_IN_PROGRESS',
+ +payload: { +sessionRecoveryInProgress: boolean, +keyserverID: string },
};
export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 4:32 PM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580435
Default Alt Text
D10948.id36648.diff (2 KB)

Event Timeline