HomePhabricator
Diffusion Comm 740dc18c6558

[web] Introduce `useFilteredChildThreads` hook

Description

[web] Introduce useFilteredChildThreads hook

Summary:
Introduce hook containing logic responsible for selecting ChatThreadItems containing child threads with some filter, so it could be used in both Subchannels and Sidebars modals on web.
The hook also adds watching to threads and fetches most recent message from server if necessary, so all threads data are always updated.
The logic is almost completely moved from SubchannelsModal and only some default parameters were added.

Test Plan: The subchannels modal should behave in the same way as before change.

Reviewers: tomek, atul

Reviewed By: tomek

Subscribers: ashoat, adrian, abosh

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

Details

Provenance
jacekAuthored on Jul 26 2022, 8:29 AM
Reviewer
tomek
Differential Revision
D4606: [web] Introduce `useFilteredChildThreads` hook
Parents
rCOMMbdd4a6e23124: [keyserver] Limit mysqldump backup queries to 0.5 MiB
Branches
Unknown
Tags
Unknown