diff --git a/lib/hooks/search-threads.js b/lib/hooks/search-threads.js --- a/lib/hooks/search-threads.js +++ b/lib/hooks/search-threads.js @@ -102,10 +102,12 @@ function useSearchSubchannels( threadInfo: ThreadInfo, ): SearchThreadsResult { - const childThreadInfos = useFilteredChatListData( + const filterFunc = React.useCallback( (thread: ?(ThreadInfo | RawThreadInfo)) => threadIsChannel(thread) && thread?.parentThreadID === threadInfo.id, + [threadInfo.id], ); + const childThreadInfos = useFilteredChatListData(filterFunc); return useSearchThreads(threadInfo, childThreadInfos); }