Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3525592
D6971.id24782.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6971.id24782.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D6971: [web] Filter available chats based on the picked community
Attached
Detach File
Event Timeline
Log In to Comment