Page MenuHomePhabricator

[lib] Simplify `getRelativeMemberInfos`
ClosedPublic

Authored by atul on Dec 7 2023, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 6:26 PM
Unknown Object (File)
Mon, Dec 23, 6:26 PM
Unknown Object (File)
Mon, Dec 23, 6:26 PM
Unknown Object (File)
Mon, Dec 23, 6:26 PM
Unknown Object (File)
Mon, Dec 23, 6:26 PM
Unknown Object (File)
Mon, Dec 16, 7:55 PM
Unknown Object (File)
Nov 6 2024, 1:05 PM
Unknown Object (File)
Nov 6 2024, 1:05 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
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

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

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.