HomePhabricator
Diffusion Comm 2f5b9feaccb3

[lib] Add a selector for community roots

Description

[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

Details

Provenance
InkaSokolowskaAuthored on Dec 29 2022, 9:09 AM
Reviewer
tomek
Differential Revision
D5627: [lib] Add a selector for community roots
Parents
rCOMM8ac08973258f: [lib/keyserver] add check to make sure users cannot send reactions from the…
Branches
Unknown
Tags
Unknown