Page MenuHomePhabricator

[lib] Simplify `getRelativeMemberInfos`
ClosedPublic

Authored by atul on Dec 7 2023, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 15, 8:50 PM
Unknown Object (File)
Tue, Oct 15, 8:50 PM
Unknown Object (File)
Sep 26 2024, 6:11 AM
Unknown Object (File)
Sep 16 2024, 1:59 PM
Unknown Object (File)
Sep 16 2024, 1:59 PM
Unknown Object (File)
Sep 16 2024, 1:59 PM
Unknown Object (File)
Sep 16 2024, 1:59 PM
Unknown Object (File)
Sep 12 2024, 8:10 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
Branch
arcpatch-D10233 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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.