HomePhabricator
Diffusion Comm 296508de0b69

[lib, native] Extract from `useSearchSidebars` code that can be used to obtain…

Description

[lib, native] Extract from useSearchSidebars code that can be used to obtain chats subchannels info.

Summary: Community drawer has buttons that navigate to a view of given chats subchannels. As discussed in https://linear.app/comm/issue/DES-20/designs-for-subchannels-modal, https://linear.app/comm/issue/ENG-2373/subchannels-view this view will display items that look similar to items in SidebarListModal, so I will want to reuse a lot of the code. I extracted from code that was used to obtain chats sidebars info code that can be used to obtain chats subchannels and made wrapper functions for these two use cases.

Test Plan:
Run the ios simulator, see that sidebar modals display correctly.
Tested the useSearchSubchannels by logging to the console what it returned.

Reviewers: przemek, kamil, tomek

Reviewed By: kamil, tomek

Subscribers: ashoat, tomek, atul

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

Details