HomePhabricator
Diffusion Comm 2ee243b09b8a

[web] Only call userInfoSelectorForPotentialMembers where it's needed

Description

[web] Only call userInfoSelectorForPotentialMembers where it's needed

Summary:
The only callsite of useInfosForPendingThread that needs otherUserInfos is ChatMessageListContainer. It's only needed there to pass to ChatThreadComposer.

To avoid fetching it unnecessarily at the other callsites, I've extracted it to that single callsite. This also benefits code readability by reducing indirection and unnecessary prop drilling.

Depends on D13540

Test Plan: Flow (this is a pure refactor)

Reviewers: tomek, kamil, inka

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D13541

Details