Page MenuHomePhabricator

D6971.id24782.diff
No OneTemporary

D6971.id24782.diff

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 => (
- <ChatThreadListItem item={item} key={item.threadInfo.id} />
- ));
+ const threads = threadList
+ .filter(
+ item =>
+ !communityID ||
+ item.threadInfo.community === communityID ||
+ item.threadInfo.id === communityID,
+ )
+ .map(item => <ChatThreadListItem item={item} key={item.threadInfo.id} />);
if (threads.length === 0 && isBackground) {
threads.push(<EmptyItem key="emptyItem" />);
}
return threads;
- }, [threadList, isBackground]);
+ }, [threadList, isBackground, communityID]);
return (
<>

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 5:48 PM (9 h, 18 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2699915
Default Alt Text
D6971.id24782.diff (1 KB)

Event Timeline