Page MenuHomePhabricator

D13730.id45229.diff
No OneTemporary

D13730.id45229.diff

diff --git a/web/chat/thread-list-provider.js b/web/chat/thread-list-provider.js
--- a/web/chat/thread-list-provider.js
+++ b/web/chat/thread-list-provider.js
@@ -179,13 +179,24 @@
);
const threadFilter =
activeTab === 'Muted' ? threadInBackgroundChatList : threadInHomeChatList;
- const chatListDataWithoutFilter = getThreadListSearchResults(
- chatListData,
- searchText,
- threadFilter,
- threadSearchResults,
- usersSearchResults,
- loggedInUserInfo,
+ const chatListDataWithoutFilter = React.useMemo(
+ () =>
+ getThreadListSearchResults(
+ chatListData,
+ searchText,
+ threadFilter,
+ threadSearchResults,
+ usersSearchResults,
+ loggedInUserInfo,
+ ),
+ [
+ chatListData,
+ searchText,
+ threadFilter,
+ threadSearchResults,
+ usersSearchResults,
+ loggedInUserInfo,
+ ],
);
const activeTopLevelChatThreadItem = useChatThreadItem(
activeTopLevelThreadInfo,

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 10:23 PM (16 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696876
Default Alt Text
D13730.id45229.diff (999 B)

Event Timeline