MCPcopy Create free account
hub / github.com/CommE2E/comm / findThreadChildrenItems

Function findThreadChildrenItems

native/utils/drawer-utils.react.js:86–100  ·  view source on GitHub ↗
(
  data: $ReadOnlyArray<CommunityDrawerItemData<T>>,
  id: string,
)

Source from the content-addressed store, hash-verified

84}
85
86function findThreadChildrenItems<T>(
87 data: $ReadOnlyArray<CommunityDrawerItemData<T>>,
88 id: string,
89): ?$ReadOnlyArray<CommunityDrawerItemData<T>> {
90 for (const item of data) {
91 if (item.threadInfo.id === id) {
92 return item.itemChildren;
93 }
94 const result = findThreadChildrenItems(item.itemChildren, id);
95 if (result) {
96 return result;
97 }
98 }
99 return undefined;
100}
101
102function filterOutThreadAndDescendantIDs<T>(
103 idsToFilter: $ReadOnlyArray<string>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected