diff --git a/web/chat/chat-thread-list.react.js b/web/chat/chat-thread-list.react.js --- a/web/chat/chat-thread-list.react.js +++ b/web/chat/chat-thread-list.react.js @@ -31,15 +31,22 @@ const isBackground = activeTab === 'Background'; + const communityID = useSelector(state => state.communityPickerStore.chat); + const threadComponents: React.Node[] = React.useMemo(() => { - const threads = threadList.map(item => ( - - )); + const threads = threadList + .filter( + item => + !communityID || + item.threadInfo.community === communityID || + item.threadInfo.id === communityID, + ) + .map(item => ); if (threads.length === 0 && isBackground) { threads.push(); } return threads; - }, [threadList, isBackground]); + }, [threadList, isBackground, communityID]); return ( <>