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)
Fri, Apr 11, 12:50 PM
Unknown Object (File)
Wed, Apr 9, 12:57 AM
Unknown Object (File)
Tue, Apr 8, 10:51 PM
Unknown Object (File)
Tue, Apr 8, 10:36 PM
Unknown Object (File)
Tue, Apr 8, 10:26 PM
Unknown Object (File)
Tue, Apr 8, 9:39 PM
Unknown Object (File)
Tue, Apr 8, 9:11 PM
Unknown Object (File)
Mon, Mar 31, 7:35 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