Page MenuHomePhabricator

[lib] Refactor keyserver reducer pt.2 - early return
ClosedPublic

Authored by inka on Nov 10 2023, 6:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 26, 6:22 PM
Unknown Object (File)
Wed, Dec 25, 1:46 AM
Unknown Object (File)
Mon, Dec 23, 8:54 PM
Unknown Object (File)
Mon, Dec 23, 8:54 PM
Unknown Object (File)
Mon, Dec 23, 8:54 PM
Unknown Object (File)
Mon, Dec 23, 8:54 PM
Unknown Object (File)
Mon, Dec 23, 8:54 PM
Unknown Object (File)
Mon, Dec 23, 8:54 PM
Subscribers

Details

Summary

issue: https://linear.app/comm/issue/ENG-5350/refactor-reducekeyserverstore
Now that the reducers this reducer used to call got inlined, we can early return from the keyserver reducer

Test Plan

Tested a couple of actions: queueActivityUpdatesActionType, updateDisconnectedBarActionType, updateActivityActionTypes.success, updateConnectionStatusActionType, checked that they work as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka requested review of this revision.Nov 10 2023, 7:02 AM
michal requested changes to this revision.Nov 14 2023, 6:17 AM
michal added inline comments.
lib/reducers/keyserver-reducer.js
67–92 ↗(On Diff #33204)

Return should be after these two ifs

99 ↗(On Diff #33204)

We should return after outside of for

This revision now requires changes to proceed.Nov 14 2023, 6:17 AM

Fix returns from ifs and loop

lib/reducers/keyserver-reducer.js
101–108 ↗(On Diff #33211)

I don't think that's correct

This revision is now accepted and ready to land.Nov 16 2023, 5:06 AM