Page MenuHomePhabricator

[lib] Simplify `getRelativeMemberInfos`
ClosedPublic

Authored by atul on Dec 7 2023, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 5 2024, 3:15 PM
Unknown Object (File)
Mar 5 2024, 3:15 PM
Unknown Object (File)
Mar 5 2024, 3:15 PM
Unknown Object (File)
Mar 5 2024, 3:15 PM
Unknown Object (File)
Mar 5 2024, 3:15 PM
Unknown Object (File)
Jan 28 2024, 2:33 AM
Unknown Object (File)
Dec 29 2023, 2:56 AM
Unknown Object (File)
Dec 28 2023, 9:03 PM
Subscribers
None

Details

Summary

In subsequent diff going to split into two separate functions: getLegacyRelativeMemberInfos and getMinimallyEncodedRelativeMemberInfos and then toggle between then based on whether input RawThreadInfo is minimallyEncoded or not.

Since that diff is about duplicating existing functionality and branching... figure changing the actual functionality may be annoying for reviewers even though it's minimal (?)


Depends on D10227

Test Plan

CI/flow/etc.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Dec 7 2023, 12:25 PM
ashoat added inline comments.
lib/selectors/user-selectors.js
74–86 ↗(On Diff #34389)

With the new Flow, I wonder if you can get rid of the branching

This revision is now accepted and ready to land.Dec 8 2023, 2:52 PM
This revision was landed with ongoing or failed builds.Dec 13 2023, 1:45 PM
This revision was automatically updated to reflect the committed changes.
lib/selectors/user-selectors.js
74–86 ↗(On Diff #34389)

I was about to do that, but noticed that in the currentUserID case we unshift whereas in the non-currentUserID case we push.

Don't have full context on why we need these ordered in any particular way, but didn't want to mess with existing assumptions here.

Definitely let me know if I'm missing something and I'm happy to address.