Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32223067
D10760.1765206995.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10760.1765206995.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
@@ -111,24 +111,25 @@
}
return state;
}
+ const operations: ReplaceKeyserverOperation[] = [];
if (sessionChange.cookie !== undefined) {
- state = {
- ...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ operations.push({
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
cookie: sessionChange.cookie,
},
},
- };
+ });
}
if (sessionChange.cookieInvalidated) {
- state = {
- ...state,
- keyserverInfos: {
- ...state.keyserverInfos,
- [keyserverID]: {
+ operations.push({
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
...state.keyserverInfos[keyserverID],
connection: {
...state.keyserverInfos[keyserverID].connection,
@@ -136,9 +137,12 @@
},
},
},
- };
+ });
}
- return state;
+ return {
+ ...state,
+ keyserverInfos: processStoreOps(state.keyserverInfos, operations),
+ };
} else if (
action.type === logInActionTypes.success ||
action.type === siweAuthActionTypes.success ||
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 8, 3:16 PM (3 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848811
Default Alt Text
D10760.1765206995.diff (1 KB)
Attached To
Mode
D10760: [lib] refactor set new session in `keyserver-reducer` to ops
Attached
Detach File
Event Timeline
Log In to Comment