Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3245676
D9820.id33204.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D9820.id33204.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
@@ -57,14 +57,14 @@
keyserverInfos[keyserverID] = { ...keyserverInfos[keyserverID], cookie };
}
- state = {
+ return {
...state,
keyserverInfos,
};
} else if (action.type === setNewSessionActionType) {
const { keyserverID } = action.payload;
if (action.payload.sessionChange.cookie !== undefined) {
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -76,7 +76,7 @@
};
}
if (action.payload.sessionChange.cookieInvalidated) {
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -96,7 +96,7 @@
) {
const { updatesCurrentAsOf } = action.payload;
for (const keyserverID in updatesCurrentAsOf) {
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -110,7 +110,7 @@
}
} else if (action.type === fullStateSyncActionType) {
const { keyserverID } = action.payload;
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -132,7 +132,7 @@
break;
}
}
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -149,7 +149,7 @@
action.payload.updatesResult.currentAsOf,
state.keyserverInfos[ashoatKeyserverID].updatesCurrentAsOf,
);
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -160,7 +160,7 @@
},
};
} else if (action.type === setURLPrefix) {
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -172,7 +172,7 @@
};
} else if (action.type === updateLastCommunicatedPlatformDetailsActionType) {
const { keyserverID } = action.payload;
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -184,7 +184,7 @@
};
} else if (action.type === updateConnectionStatusActionType) {
const { keyserverID, status } = action.payload;
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -200,7 +200,7 @@
};
} else if (action.type === unsupervisedBackgroundActionType) {
const { keyserverID } = action.payload;
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -237,7 +237,7 @@
],
};
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -265,7 +265,7 @@
},
};
}
- state = {
+ return {
...state,
keyserverInfos,
};
@@ -283,7 +283,7 @@
},
};
- state = {
+ return {
...state,
keyserverInfos,
};
@@ -297,7 +297,7 @@
} else {
lateResponsesSet.delete(messageID);
}
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -312,7 +312,7 @@
};
} else if (action.type === updateDisconnectedBarActionType) {
const { keyserverID } = action.payload;
- state = {
+ return {
...state,
keyserverInfos: {
...state.keyserverInfos,
@@ -334,7 +334,7 @@
deviceToken: deviceTokens[keyserverID],
};
}
- state = {
+ return {
...state,
keyserverInfos,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 8:00 PM (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2495247
Default Alt Text
D9820.id33204.diff (3 KB)
Attached To
Mode
D9820: [lib] Refactor keyserver reducer pt.2 - early return
Attached
Detach File
Event Timeline
Log In to Comment