Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3355673
D10761.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10761.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
@@ -156,20 +156,24 @@
action.type === keyserverAuthActionTypes.success
) {
const { updatesCurrentAsOf } = action.payload;
- let keyserverInfos = { ...state.keyserverInfos };
+
+ const operations: ReplaceKeyserverOperation[] = [];
for (const keyserverID in updatesCurrentAsOf) {
- keyserverInfos = {
- ...keyserverInfos,
- [keyserverID]: {
- ...keyserverInfos[keyserverID],
- updatesCurrentAsOf: updatesCurrentAsOf[keyserverID],
- lastCommunicatedPlatformDetails: getConfig().platformDetails,
+ operations.push({
+ type: 'replace_keyserver',
+ payload: {
+ id: keyserverID,
+ keyserverInfo: {
+ ...state.keyserverInfos[keyserverID],
+ updatesCurrentAsOf: updatesCurrentAsOf[keyserverID],
+ lastCommunicatedPlatformDetails: getConfig().platformDetails,
+ },
},
- };
+ });
}
return {
...state,
- keyserverInfos,
+ keyserverInfos: processStoreOps(state.keyserverInfos, operations),
};
} else if (action.type === fullStateSyncActionType) {
const { keyserverID } = action.payload;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 2:59 PM (19 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2576484
Default Alt Text
D10761.diff (1 KB)
Attached To
Mode
D10761: [lib] refactor login action in `keyserver-reducer` to ops
Attached
Detach File
Event Timeline
Log In to Comment