[lib] Add a selector for community roots
Summary:
Related Linear issue: https://linear.app/comm/issue/ENG-1881/community-navigation-drawer-on-native
Community drawer needs to know which threads are communities. For this reason I created this selector.
Test Plan:
Add the following to in native/chat/message-list-container.react.js at the begining of ConnectedMessageListContainer:
const communities = useSelector(communintyThreadSelector); for (const community of communities) { console.log(community.name); }
and enter a chat. See, that community names are being logged to console (I have an artificially added second community, and both this community and GENESIS get logged).
Reviewers: kamil, atul, bartek, tomek
Reviewed By: tomek
Subscribers: ashoat, abosh
Differential Revision: https://phab.comm.dev/D5627