Page MenuHomePhabricator

D3598.id10957.diff
No OneTemporary

D3598.id10957.diff

diff --git a/lib/selectors/chat-selectors.js b/lib/selectors/chat-selectors.js
--- a/lib/selectors/chat-selectors.js
+++ b/lib/selectors/chat-selectors.js
@@ -221,6 +221,12 @@
);
function useFlattenedChatListData(): $ReadOnlyArray<ChatThreadItem> {
+ return useFilteredChatListData(threadInChatList);
+}
+
+function useFilteredChatListData(
+ filterFunction: (threadInfo: ?(ThreadInfo | RawThreadInfo)) => boolean,
+): $ReadOnlyArray<ChatThreadItem> {
const threadInfos = useSelector(threadInfoSelector);
const messageInfos = useSelector(messageInfoSelector);
const sidebarInfos = useSelector(sidebarInfoSelector);
@@ -233,9 +239,9 @@
messageStore,
messageInfos,
sidebarInfos,
- threadInChatList,
+ filterFunction,
),
- [messageInfos, messageStore, sidebarInfos, threadInfos],
+ [messageInfos, messageStore, sidebarInfos, filterFunction, threadInfos],
);
}
@@ -491,5 +497,6 @@
createChatMessageItems,
messageListData,
useFlattenedChatListData,
+ useFilteredChatListData,
useMessageListData,
};

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 6:49 AM (20 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2675266
Default Alt Text
D3598.id10957.diff (1 KB)

Event Timeline